R0Wi-DEV / workflow_ocr

This is a Nextcloud Workflow App which enables you to process files via OCR on serverside.
GNU Affero General Public License v3.0
79 stars 6 forks source link

[FEATURE] Improve error handling in config UI #219

Open R0Wi opened 1 year ago

R0Wi commented 1 year ago

Related issues

https://github.com/R0Wi-DEV/workflow_ocr/issues/215 https://github.com/R0Wi-DEV/workflow_ocr/issues/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