cloudconvert / cloudconvert-java

Official CloudConvert Java SDK
35 stars 19 forks source link

Key diagnostic information in CloudConvertClientException not included in stack traces #45

Open mattrussell-sonocent opened 2 years ago

mattrussell-sonocent commented 2 years ago

When the library emits a CloudConvertClientException, it doesn't report any information about the status code or error response / code in the exception message, although these are captured on the exception object as fields. This means that by default, none of this information ends up in logs / stack traces, obscuring diagnostics. Could the message be changed to include the key information captured by these fields?

An example stack trace at present:

c.c.e.CloudConvertClientException: null
    at c.c.e.ResultExtractor.extract(ResultExtractor.java:71)
    at c.c.e.RequestExecutor.execute(RequestExecutor.java:27)
    at c.c.r.s.ImportFilesResource.upload(ImportFilesResource.java:67)
    at c.c.r.s.ImportFilesResource.upload(ImportFilesResource.java:112)
    at c.c.r.s.ImportFilesResource.upload(ImportFilesResource.java:35)
...
alialrabi commented 2 years ago

Yes, I'm trying to use he library and I get Null exception but there are no information about this.