Comments (3)
You can find the error message on error.response
, eg:
try {
await login({ email, password })
catch (err) {
showError(err.response.data) // data is an object with `message` and other fields
}
from nhost-js-sdk.
Hi there,
was about to post an issue re this. the response for all the auth methods need to be expanded imo. atm they are not allowing a nice handling of the error states. the messages are not exposed to the client. i can see them on the server but they should trickle down to client too.
what do you think @elitan ?
Best,
Cezar
from nhost-js-sdk.
Sounds reasonable. Do you have a good example of where this is not the case right now? so I get a better understanding.
from nhost-js-sdk.
Related Issues (20)
- putString method returns sample image.
- Check second parameter of `storage.put(path, file)`
- Uncaught TypeError: auth.requestPasswordChange is not a function HOT 4
- [FEATURE REQUEST] User Role helper
- JWT Refresh across multiple tabs HOT 11
- Refresh lock seems to not work HOT 5
- Are source maps being generated correctly?
- Add CI
- module has no exported defaults
- change password endpoint response HOT 5
- Improve robustness of expired token handling
- AUTO_ACTIVATE_NEW_USERS is false but user still get logged in on register HOT 2
- HttpOnly Cookies auth flow is flawed. HOT 1
- Setting a timer for a long period of time HOT 1
- `/refresh_token` gets called twice when reloading a page
- API Response object HOT 2
- onAuthStateChanged
- onAuthStateChanged Callback parameter HOT 1
- Database backups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nhost-js-sdk.