Skip to content

Typed exception hierarchy #13

@rammrain

Description

@rammrain

Summary

Define a structured exception hierarchy to distinguish between different failure modes.

Requirements

  • Base MontonioException extending RuntimeException
  • MontonioApiException — API returned an error response (include HTTP status, error body)
  • MontonioNetworkException — connection failures, timeouts
  • MontonioAuthenticationException — invalid credentials, token issues
  • MontonioValidationException — invalid input before sending request
  • Each exception should carry enough context for the consumer to act on it

Refs

  • initial-docs/project1.md — typed error handling: API errors, network errors, validation failures
  • initial-docs/project3.md — meaningful exceptions on API errors, network failures, auth issues

Testing

Unit tests for each exception type: construction, message formatting, cause chaining, context accessors. Target near-perfect coverage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions