Skip to content

inconsistent return values / exceptions #20

Open
@peda

Description

@peda

Hello,

We've noticed inconsistencies in the return values for API calls, particularly concerning error handling. In some cases, errors return a valid response object containing detailed error descriptions. In other instances, errors such as access_code_not_found, device_not_found, not_supported, etc., trigger an ApiError exception. This inconsistency necessitates duplicative error handling efforts—once for error responses and once for ApiError exceptions. Managing actual, unforeseen exceptions then becomes a third, separate process.

To streamline development and maintenance, it would be beneficial if the API's error responses were more predictable and uniform. This change would enhance our ability to efficiently handle errors and improve overall system reliability.

Thank you.

Edit: Prior to upgrading to the latest version, we had error handling mechanisms in place for managing valid error responses. However, post-upgrade, we've observed that most (or all) of this error handling is no longer triggered, suggesting a potential change in the API's behavior with the latest version. Additionally, the ApiError is problematic as it presents the raw JSON of the error message, which could lead to further issues if future API changes are made. This could disrupt error handling in projects using the current version of the Java library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions