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

[FEATURE] Improve error handling in config UI #219

Open
R0Wi opened this issue Aug 11, 2023 · 0 comments
Open

[FEATURE] Improve error handling in config UI #219

R0Wi opened this issue Aug 11, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@R0Wi
Copy link
Contributor

R0Wi commented Aug 11, 2023

Related issues

#215
#183

Description

If the user opens up the workflow config UI, we query some data in the background which represents the current config state (for example the installed OCR languages which we show later in a dropdown menu). There is currently not really an error handling in case any of the API endpoints returns a statuscode != 200.

To do

We should improve our ajax service classes in https://github.com/R0Wi-DEV/workflow_ocr/tree/be65cde83a867b15e86c6c9594da8fa877c33089/src/service to handle any error responses. Our server implementations will return something like this in case of an unhandled 500 server error:

{ "error": "<MESSAGE>" }

Implementation plan

  • Inject a possibility to show UI notifications into our ajax service classes (something like OC.Notification.showTemporary but ideally non-static)
  • Implement error handling in case server sends a non-200 statuscode (show message in that case if possible, otherwise "unknown error...")
  • Adjust tests
@R0Wi R0Wi added the enhancement New feature or request label Aug 11, 2023
@R0Wi R0Wi self-assigned this Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant