Skip to content
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

Frontend: Disable error toasts for axios responses #2165

Closed
MichaelZett opened this issue Nov 18, 2022 · 4 comments
Closed

Frontend: Disable error toasts for axios responses #2165

MichaelZett opened this issue Nov 18, 2022 · 4 comments

Comments

@MichaelZett
Copy link

Since version 2.7.5 of Spring Boot Admin, we are getting a lot of 404 error toasts in our custom views because we are executing axios requests against our applications to see if an endpoint is available or not. We would rather avoid getting an error toast in the case of a 404 response because we also use that for optional endpoints and we don't want to maintain a list of apps that provide these endpoints but discover it.

Here is the axios interceptor responsible for the error toast: https://github.com/codecentric/spring-boot-admin/blob/2.7.7/spring-boot-admin-server-ui/src/main/frontend/utils/axios.js#L37

Would it be possible to add a configuration option to disable this toast in the custom views?

@SteKoe
Copy link
Contributor

SteKoe commented Nov 25, 2022

Hi @MichaelZett,

thanks for suggesting this enhancement. We are planning to implement a configuration option for this in the future. If you need this asap, feel free to provide a PR. FYI: In Spring Boot Admin 3, we have introduced grouped by HTTP-Status code toast messages to reduce pollution.

Regards
SteKoe

@mdzunic
Copy link

mdzunic commented Dec 4, 2022

Hi, do you have any example of setting the configuration in frontend? I wasn't able to find anything like that in docs (https://codecentric.github.io/spring-boot-admin/)

Thanks,
Miroslav

@SteKoe
Copy link
Contributor

SteKoe commented Dec 5, 2022

Hi @mdzunic,

there is no config right now. As we stated above, we are planning to implement it but haven’t yet. If you need this asap, feel free to provide a PR.

Regards
SteKoe

@SteKoe
Copy link
Contributor

SteKoe commented Dec 10, 2022

Hi,

we have just released version 2.7.9 of SBA that includes a property to enable toasts spring.boot.admin.ui.enable-toasts. They are disabled by default, now.

Sorry for the inconvenience.

@SteKoe SteKoe closed this as completed Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants