Fetch errors are swallowed without logs #11694
Labels
amazon-cognito-identity-js
Used for issues related to this specific package within the monorepo
Core
Related to core Amplify issues
feature-request
Request a new feature
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
Authentication, GraphQL API
Amplify Categories
auth, api
Environment information
Tested in Chrome with latest Amplify packages.
Describe the bug
Amplify JS SDK swallows fetch errors and simply throws "Network error", even if no network request is ever done. Nothing is logged, unless you turn on DEBUG level logging you see the Auth fetch request fails.
Expected behavior
Actual error message is thrown or the very least an error level log is written.
Reproduction steps
Code Snippet
No response
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
.
Mobile Browser Version
No response
Additional information and screenshots
I fixed the error in the fetch request, but finding the error was not easy as I had to spend time debugging a "Network error" even though there was nothing in the DevTools Network tab.
The text was updated successfully, but these errors were encountered: