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

Bug/Improvement: Fetch-with-error-handling should get json from Flows error-handler #3183

Open
mhsdesign opened this issue Sep 2, 2022 · 1 comment

Comments

@mhsdesign
Copy link
Member

When there is an exception in a Ui ajax request, Flows error-handler doesnt respect the accept header, and we dont set it.

Accept: application/json

For better display and further handling, we need errors in the json format.

Maybe the proposed header Accept: application/json is not always correct, as i know of some cases where we fetch xml from the server, for example in the link editor.

Currently, the "fetchWithErrorHandling" helper tries to put the Html from the Flow exception-handler into a temporary dom element to retrieve the innerText and tries to display the headline or something, but this is rather suboptimal and not always working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant