-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
enhancementNew feature or requestNew feature or request
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
Labels
enhancementNew feature or requestNew feature or request