Bug 32709 - Background job UI and REST API routes explode if JSON is incorrect
Summary: Background job UI and REST API routes explode if JSON is incorrect
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 32393
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-24 11:21 UTC by Jonathan Druart
Modified: 2023-01-24 11:26 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 32709: Prevent REST API and UI to crash if job has incorrect JSON (3.19 KB, patch)
2023-01-24 11:24 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-01-24 11:21:52 UTC
Same as bug 32393, but for the REST API routes and the UI.
Comment 1 Jonathan Druart 2023-01-24 11:24:42 UTC
Created attachment 145607 [details] [review]
Bug 32709: Prevent REST API and UI to crash if job has incorrect JSON

Same as bug 32393, but for the REST API routes and the UI.

Test plan:
Enqueue a job with an incorrect JSON string in the data column
Go to the background jobs list and the detail views
Confirm that no the page does not explodes
Notice the warning on the detail page
Comment 2 Jonathan Druart 2023-01-24 11:26:40 UTC
I think we need that. However I am not sure how to deal with logging. With this patch we are logging 4 times the same "Cannot decode data for background job id=" error, how could we do better?

This patch also needs tests.