-
Notifications
You must be signed in to change notification settings - Fork 136
Fix for issue #3180 #3321
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
Fix for issue #3180 #3321
Conversation
Error page will be only shown for error code 500 (as hard-coded for the CoderBot).
maxceem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gets0ul I cannot test it properly as I cannot trigger error with code 500 though it looks for me that the main issue is not resolved.
If during create/update/delete we would get error with code 500 and after we switch to another page, we would still see the error page as was described in the issue #3180
I guess there are two ways to go:
- If we don't need this
errorinside Redux Store for create/update/remove actions, we can just remove thiserrorproperty and don't set it when error happens when we create/update/remove objects. As you've mentioned before we already showing the error message. So we just have to verify we really don't use thiserrorin these cases elsewhere. - If we still need these
errorin redux after create/update/remove actions, then we should reset it when we change page. So even if some error happens during create/update/remove it shouldn't break other functionality when we are switching page.
Let me know what you think.
|
Yes the error is is not needed and can be removed from the store as it is not used anywhere.
You don't need to trigger the 500. I mean, main issue is whenever error occurs when dealing with metadata management, we can't go back to the any page as error page will be shown (because of that error in the redux) And my fix already solves that. Using the example project, with phsah_manager account, error is shown by popup, and we are now able to switch to other page as required by the issue spec.
Yes that's why I don't remove the error from the store for 500 error: |
Right, it work because now error which we get has code 403. But imagine if we update some object and there is error on server with code 500. In such case if we switch the page after, we would see error page. But we shouldn't see error page after we switch page. For example, for testing I can update your code to catch errors from code 400: error: action.payload.response.data.result.status >= 400Now if I try to save any object I will get an error, and if I switch the page, I would still see error page. But I shouldn't see error page, because this error happens before and shouldn't break other pages. |
So we will be doing it instead. Right? |
We should either reset it when we change page. |
|
It is not needed. Lets take Project Template metadata management as example. The The |
|
Yes, though we would want it to be set to false as template grid view marks the prop as required. I will submit new commit. |
Hmm, I'm not sure why we should set it to |
|
Yeah, I checked again. We do not need to as it has default |
maxceem
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for exploring this issue @gets0ul.
Works good without keeping the error in Redux Store.

#3180
Error message has been already shown by alert popup.
Error page will be only shown for error code 500 (as hard-coded for the CoderBot).
https://github.com/appirio-tech/connect-app/blob/b2022930027fa7e0e97cd1a42e0373ed0b70cdb3/src/routes/metadata/containers/ProjectTemplatesContainer.jsx#L117