DataTables is not raising error to the end user, it's only displaying a generic message in the console. This leads to lot of questions on IRC or the mailing list ("the table is empty"). We can do better and display what went wrong. We could also imagine add a link to the wiki for the more common problems (won't be implemented here however).
Created attachment 137609 [details] [review] Bug 31138: Don't ignore DataTables errors and raise them to the end-user DataTables is not raising error to the end user, it's only displaying a generic message in the console. This leads to lot of questions on IRC or the mailing list ("the table is empty"). We can do better and display what went wrong. We could also imagine add a link to the wiki for the more common problems (won't be implemented here however). Test plan: Revert "Bug 31104: Put each link on a separate header" and search for a patron using a very long string You should get an alert with the reponse of the server. In my case: """ Something went wrong when loading the table. 414: Request-URI Too Long """ You can also make the REST API returns a 500 (bad specs or simply with a die statement).
Created attachment 137615 [details] [review] Bug 31138: Don't ignore DataTables errors and raise them to the end-user DataTables is not raising error to the end user, it's only displaying a generic message in the console. This leads to lot of questions on IRC or the mailing list ("the table is empty"). We can do better and display what went wrong. We could also imagine add a link to the wiki for the more common problems (won't be implemented here however). Test plan: Revert "Bug 31104: Put each link on a separate header" and search for a patron using a very long string You should get an alert with the reponse of the server. In my case: """ Something went wrong when loading the table. 414: Request-URI Too Long """ You can also make the REST API returns a 500 (bad specs or simply with a die statement). Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as designed.. signing off. We could go a little further and grab our API error messages from 'responseJSON'.. but I'm not sure if would yield any better results in terms of people coming and asking for help.. we're still likely to need to ask for more details to really investigate any problems and as such direct them at the console and networking log to get those details anyway.
Created attachment 138030 [details] [review] Bug 31138: Don't ignore DataTables errors and raise them to the end-user DataTables is not raising error to the end user, it's only displaying a generic message in the console. This leads to lot of questions on IRC or the mailing list ("the table is empty"). We can do better and display what went wrong. We could also imagine add a link to the wiki for the more common problems (won't be implemented here however). Test plan: Revert "Bug 31104: Put each link on a separate header" and search for a patron using a very long string You should get an alert with the reponse of the server. In my case: """ Something went wrong when loading the table. 414: Request-URI Too Long """ You can also make the REST API returns a 500 (bad specs or simply with a die statement). Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.05
Thanks! Pushed to 21.11 for 21.11.12
Backported: Pushed to 21.05.x branch for 21.05.19