forked from ebkr/r2modmanPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve profile code API error handling
This commit ensures the profile code API client is properly checking for and handling errors for both profile creation and import API calls. Previously error handling was only done for profile exports and it wasn't handling some edge cases properly (apparently Axios does not always throw an error but instead returns it, this can occur at least if CORS checks fail). Now the same error handling is used for both API calls and that error handling has been adjusted to account for the edge case mentioned earlier. In practice this means users should see somewhat more legible error messages for common failures such as 404 HTTP status codes as opposed to an arbitrary 'Cannot read properties of undefined'.
- Loading branch information
1 parent
66ac202
commit 983723b
Showing
1 changed file
with
46 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters