mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Improve display of "no response from server" message
This commit is contained in:
		| @@ -61,7 +61,11 @@ function inventreeGet(url, filters={}, options={}) { | |||||||
|         }, |         }, | ||||||
|         error: function(xhr, ajaxOptions, thrownError) { |         error: function(xhr, ajaxOptions, thrownError) { | ||||||
|             console.error('Error on GET at ' + url); |             console.error('Error on GET at ' + url); | ||||||
|             console.error(thrownError); |  | ||||||
|  |             if (thrownError) { | ||||||
|  |                 console.error('Error: ' + thrownError); | ||||||
|  |             } | ||||||
|  |  | ||||||
|             if (options.error) { |             if (options.error) { | ||||||
|                 options.error({ |                 options.error({ | ||||||
|                     error: thrownError |                     error: thrownError | ||||||
| @@ -174,7 +178,7 @@ function showApiError(xhr, url) { | |||||||
|     var title = null; |     var title = null; | ||||||
|     var message = null; |     var message = null; | ||||||
|  |  | ||||||
|     switch (xhr.status) { |     switch (xhr.status || 0) { | ||||||
|     // No response |     // No response | ||||||
|     case 0: |     case 0: | ||||||
|         title = '{% trans "No Response" %}'; |         title = '{% trans "No Response" %}'; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user