Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error management #41

Copy link
Copy link
@ghost

Description

Hi, I would like to make a proposal for a better error management.
As i understand correctly this class is used to wrap a response. If no IOException occurs then this object is returned.

@Builder
public class Result<T> extends AbstractResult<T> {
    @Getter
    private int status;
    @Getter
    private Map<String, String> headers;
    @Getter
    private String message; // {"message":"Unauthenticated.","code":"UNAUTHENTICATED"}
    @Getter
    @Nullable
    private T body;
}

But if 40x or 50x errors occur then the message is filled with a serialized JSON object. As a user of this SDK I would like to obtain a proper deserialized error that I can use in order to perform some business logic on that. Error code enumeration would be a great feature too!
Also all the errors could be wrapped by something like CloudconvertException.

Could these be viable proposals?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.