File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
debug_toolbar/static/debug_toolbar/js Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,11 @@ function ajax(url, init) {
7575 return fetch ( url , init )
7676 . then ( function ( response ) {
7777 if ( response . ok ) {
78- return response . json ( ) ;
78+ return response . json ( ) . catch ( function ( error ) {
79+ return Promise . reject (
80+ new Error ( "The response is a invalid Json object : " + error )
81+ ) ;
82+ } ) ;
7983 }
8084 return Promise . reject (
8185 new Error ( response . status + ": " + response . statusText )
Original file line number Diff line number Diff line change 77* Raised the minimum Django version to 4.2.
88* Automatically support Docker rather than having the developer write a
99 workaround for ``INTERNAL_IPS ``.
10+ * Display a better error message when the toolbar's requests
11+ return invalid json.
1012
11134.3.0 (2024-02-01)
1214------------------
You can’t perform that action at this time.
0 commit comments