What is RequiredError? The postcards API (among others) appears to throw an axios error, but the type definition indicates it throws RequiredError and there doesn't seem to be any documentation about that.
Expected Behavior
API requests should throw a meaningful type of error in order to create reliable error handling.
Current Behavior
It is unclear what is thrown when an API request fails.
Possible Solution
Identify the thrown type and update the typedefs, or provide examples on how to handle errors, e.g. parsing response status codes.
Summary
What is
RequiredError
? The postcards API (among others) appears to throw an axios error, but the type definition indicates it throwsRequiredError
and there doesn't seem to be any documentation about that.Expected Behavior
API requests should throw a meaningful type of error in order to create reliable error handling.
Current Behavior
It is unclear what is thrown when an API request fails.
Possible Solution
Identify the thrown type and update the typedefs, or provide examples on how to handle errors, e.g. parsing response status codes.