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
mgr/dashboard: Rename and refactor ApiInterceptorService class #21386
Conversation
4551a2c
to
e1d4cde
Compare
break; | ||
} | ||
this.notificationService.show( |
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.
We cannot display a generic error when we receive a 409 error code.
409 is used on RBD management to display validation errors returned by ceph.
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.
Same problem with RGW; it returns 404 for some errors which is totally wrong in case of the UI because it will redirect the UI to the 404 page. I fixed that by catching all exceptions coming from the RGW proxy and return them as 500.
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.
Could we extend this to use something like preventDefault
to prevent the routing in specific cases?
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.
@Devp00l Could you please explain it more detailed because this PR does not change general logic of the existing code. maybe your suggestion should be done with a separate PR.
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.
@votdev we cannot implement an equivalent solution for RBDs because returning 409 in RBD is intentional.
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.
@ricardoasmarques HTTP 409 error codes do not show notifications anymore.
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.
409 should be handled manually
break; | ||
} | ||
this.notificationService.show( |
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.
Could we extend this to use something like preventDefault
to prevent the routing in specific cases?
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.
lgtm
…ifications for more errors than 401 and 500. Signed-off-by: Volker Theile <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
Signed-off-by: Volker Theile <vtheile@suse.com>
@Devp00l I've added the ability to cancel a notification. |
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.
lgtm
Display notifications for more errors than 401 and 500.
Signed-off-by: Volker Theile vtheile@suse.com