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
This is always going to the general Fatal response message and not the special message. It seems that the errors.As casting is not working here, and the error is a simple string error. I'd love to be able to parse this status code without examining the error string (which does return "HTTP 404: Not Found...").
Is there some new, undocumented method to consume these errors, or was this an accidental regression? Thanks.
The text was updated successfully, but these errors were encountered:
@nedredmond This is not a regression but I did a poor job of explaining this change in the the release notes. I wrote
Change methods on HTTPError and GraphQLError custom error types to take pointers as method receivers.
but didn't explain when that would make an impact. This is the exact case, when trying to do type assertions on the errors returned from the clients. You should be able to change your code to assert that the type returned is *api.HTTPError rather than api.HTTPError.
Before the bump to v2, I could do this:
Since updating, that is no longer a valid casting. I tried doing
errors.As
, but that didn't seem to work either.Based on some other repositories I found, I tried this:
This is always going to the general Fatal response message and not the special message. It seems that the
errors.As
casting is not working here, and the error is a simple string error. I'd love to be able to parse this status code without examining the error string (which does return "HTTP 404: Not Found...").Is there some new, undocumented method to consume these errors, or was this an accidental regression? Thanks.
The text was updated successfully, but these errors were encountered: