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
Abstracting errors to their own classes is a popular and common error structure in a lot of libraries and is a standard in certain programming languages like Java. Currently, PteroJS groups all API errors under PteroAPIError, following this structure we would abstract PteroAPIError and have AuthorizationError for 401/403 responses, ValidationError will extend this for 422 responses, and a series of other error classes for various parts of the API.
Thoughts?
The text was updated successfully, but these errors were encountered:
Abstracting errors to their own classes is a popular and common error structure in a lot of libraries and is a standard in certain programming languages like Java. Currently, PteroJS groups all API errors under
PteroAPIError
, following this structure we would abstractPteroAPIError
and haveAuthorizationError
for 401/403 responses,ValidationError
will extend this for 422 responses, and a series of other error classes for various parts of the API.Thoughts?
The text was updated successfully, but these errors were encountered: