You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the Certes API for a while (1.1.3 / 1.1.4) I noticed that error responses from the ACME endpoint are returned as a System.Exception with the message only being the Certes.Acme.AcmeHttpResponse<T>.Error.Detail variable. Specifically speaking of: EntityContext.cs Line 50 and IAcmeHttpClient.cs Line 61
In order to enable better error handling wouldn't it be nice to encapsulate the error object? Or even better the hole response, as the object that caused the exception. This way there is access to the http status code and the ACME error type. When creating a custom exception type, like AcmeErrorException or something, you could still set the exception message to the Error.Detail variable. So this change should not break any existing code. Any thoughts?
The text was updated successfully, but these errors were encountered:
True, looking at the spec i noticed the subproblems field is missing as well. Since servers may define there own error types as well, I think a more generic exception type would fit best, but that is up to you 😃
Thanks for the consideration though. The library looks well designed and tested, keep up the good work 👍
While using the Certes API for a while (1.1.3 / 1.1.4) I noticed that error responses from the ACME endpoint are returned as a
System.Exception
with the message only being theCertes.Acme.AcmeHttpResponse<T>.Error.Detail
variable. Specifically speaking of: EntityContext.cs Line 50 and IAcmeHttpClient.cs Line 61In order to enable better error handling wouldn't it be nice to encapsulate the error object? Or even better the hole response, as the object that caused the exception. This way there is access to the http status code and the ACME error type. When creating a custom exception type, like
AcmeErrorException
or something, you could still set the exception message to theError.Detail
variable. So this change should not break any existing code. Any thoughts?The text was updated successfully, but these errors were encountered: