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
I'm thinking about removing ResponseErrorHandler and it's corresponding function arguments that are in every endpoint, stemming from AudiobookshelfApi.requestJson(). This would also make the return types of those functions non-nullable.
The original idea of ResponseErrorHandler was to provide a place where the caller could have access to the original http.Response when doing JSON conversion and something went wrong. An alternative solution for this is to catch all throws from fromJson(), wrap it in a new error type that also includes the http.Response, and throw that.
I'm thinking about removing
ResponseErrorHandler
and it's corresponding function arguments that are in every endpoint, stemming fromAudiobookshelfApi.requestJson()
. This would also make the return types of those functions non-nullable.The original idea of
ResponseErrorHandler
was to provide a place where the caller could have access to the originalhttp.Response
when doing JSON conversion and something went wrong. An alternative solution for this is to catch all throws fromfromJson()
, wrap it in a new error type that also includes thehttp.Response
, and throw that.@keaganhilliard, I would like your thoughts on this.
The text was updated successfully, but these errors were encountered: