mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	improved error logging in frontend
This commit is contained in:
		| @@ -117,7 +117,12 @@ async function reportError(method, url, statusCode, response) { | |||||||
|  |  | ||||||
|     if ([400, 404].includes(statusCode) && response && typeof response === 'object') { |     if ([400, 404].includes(statusCode) && response && typeof response === 'object') { | ||||||
|         toastService.showError(message); |         toastService.showError(message); | ||||||
|         throw new ValidationError(response); |         throw new ValidationError({ | ||||||
|  |             requestUrl: url, | ||||||
|  |             method, | ||||||
|  |             statusCode, | ||||||
|  |             ...response | ||||||
|  |         }); | ||||||
|     } else { |     } else { | ||||||
|         const title = `${statusCode} ${method} ${url}`; |         const title = `${statusCode} ${method} ${url}`; | ||||||
|         toastService.showErrorTitleAndMessage(title, message); |         toastService.showErrorTitleAndMessage(title, message); | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ const TPL = ` | |||||||
|  |  | ||||||
|     <button type="button" data-toggle="dropdown" aria-haspopup="true"  |     <button type="button" data-toggle="dropdown" aria-haspopup="true"  | ||||||
|         aria-expanded="false" class="icon-action icon-action-always-border bx bx-dots-vertical-rounded" |         aria-expanded="false" class="icon-action icon-action-always-border bx bx-dots-vertical-rounded" | ||||||
|         style="position: relative; top: 5px;"></button> |         style="position: relative; top: 3px;"></button> | ||||||
|  |  | ||||||
|     <div class="dropdown-menu dropdown-menu-right"> |     <div class="dropdown-menu dropdown-menu-right"> | ||||||
|         <a data-trigger-command="openAttachment" class="dropdown-item" |         <a data-trigger-command="openAttachment" class="dropdown-item" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user