Summary: | 500 Error when running report with bad syntax | ||
---|---|---|---|
Product: | Koha | Reporter: | jstallings |
Component: | Reports | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | didier.gautheron, fridolin.somers, jonathan.druart, kyle |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.03
|
|
Circulation function: | |||
Bug Depends on: | 25026 | ||
Bug Blocks: | |||
Attachments: |
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports
Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports |
Description
jstallings
2021-08-03 12:56:57 UTC
Created attachment 123446 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Created attachment 123461 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 123686 [details] [review] Bug 28804: (bug 25026 follow-up) Handle SQL errors in reports Since bug 25026 DBMS errors are raised, but the report module is not dealing correctly with the errors. If an error occurred in execute_query, next queries will fail as well, we should skip them. Test plan: 1. Create report from SQL queries, containing errors (invalid syntax, etc.) 'SELECT id FROM borrowers' can do it 2. Execute the query => Without this patch you get a 500 => With this patch applied you see that the error raised at DBMS level is propagated to the UI 3. Confirm that there is no regression on valid queries Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.03 |