-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant access API failure message #7254
Comments
@Ross-Rawlins |
@marlass I see you replied in SO and here. Would you like to keep the communication here or there? I want to tell my team what thread to watch. |
Let's continue here |
Hi there @marlass, Thanks for this response. The feedback definitely helps. If I'm understanding you correctly your advice would be relevant for using the Our issue had arose once we began using some of the Spartacus actions, namely the If you're perhaps aware of any way to extend/override the Spartacus reducers though, that would be first prize? Our current workaround in the meantime is to create a more primitive process store along side that of Spartacus' and manage anything extra there i.e. error payloads. Our first stab at it would be to subscribe to any Example:
This approach has looked promising with our initial tests. Does it raise any concerns from your end? Thanks in advance. EDIT:
|
Hi, In 2.0 we will release mechanism for event system and that would be my preferred mechanism to solve problems with error handling. You would need to create your own event that will be based on existing action and then you could listen to that event in service/component and in there handle some reloads/errors on fail action. |
Thanks for the response. That's good to hear - looking forward to see your approach. I've done a bit more experimentation with our effects and it seems like it's going to be the most scalable way going forward till the mentioned change. Should we need our effects to cast a wider net we can simply discriminate/infer based on your meta fields for now. Thanks! |
This template is to be used for bug reports and small enhancements. For feature requests, please contact the project owner.
Note: For the bug to be accepted, it must be reproducible using the latest release of Spartacus. See our Contributor Documentation for more information.
Environment Details
Steps to Reproduce
Do an API call with any of the NGRX stores
Observed Results
API call will return a true/false or just the error code.
Expected Results
Get returned error message from the server
Repository Used
This occurs in the current repo.
Offer to Fix
We found a fix in the loader reducer but this could be set this way for a specific reason. Please let me know if this could be added.
loader.reducter.ts:45
change this to value: reducer ? reducer(state.value, action) : action.payload,
Additional Information
The text was updated successfully, but these errors were encountered: