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
Hi there, I'm new to flux and am trying to figure out how to handle errors. Any chance you could update the Todo or Chat Marty examples to handle errors on create/update? There are plenty of example of how to use the .fetch and .when APIs to handle GET errors, but I can't find a good example of how to handle errors on POST/PUT/DELETE.
Below is how I'm doing it right now for my Session store (authenticates the user). There's a lot of extra wiring involved, and it doesn't feel right to me. I've included a bunch of code, but if you could point me to an example of how to do it right I'll continue on my way :).
Starts in the login component. Here I setup a state mixin to listen to the error in the SessionStore. Should I be storing the error in the store? I call SessionSourceActionCreators.createFailed(res) from session-http-api.js, does that make sense?
Hey, sorry for late reply. I'm working on some examples for dealing with errors. In the mean time your example makes complete sense, we do something similar right now in a project I work on
Hi there, I'm new to flux and am trying to figure out how to handle errors. Any chance you could update the Todo or Chat Marty examples to handle errors on create/update? There are plenty of example of how to use the .fetch and .when APIs to handle GET errors, but I can't find a good example of how to handle errors on POST/PUT/DELETE.
Below is how I'm doing it right now for my Session store (authenticates the user). There's a lot of extra wiring involved, and it doesn't feel right to me. I've included a bunch of code, but if you could point me to an example of how to do it right I'll continue on my way :).
Starts in the login component. Here I setup a state mixin to listen to the error in the SessionStore. Should I be storing the error in the store? I call SessionSourceActionCreators.createFailed(res) from session-http-api.js, does that make sense?
login.js
session-constants.js
session-source-action-creators.js
session-http-api.js
session-action-creators.js
session-store.js
The text was updated successfully, but these errors were encountered: