You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
All: Resolves #5754: Improved error message when synchronising with Joplin Server
This commit is contained in:
@@ -5,6 +5,7 @@ import JoplinError from './JoplinError';
|
||||
import { Env } from './models/Setting';
|
||||
import Logger from './Logger';
|
||||
import personalizedUserContentBaseUrl from './services/joplinServer/personalizedUserContentBaseUrl';
|
||||
import { getHttpStatusMessage } from './net-utils';
|
||||
const { stringify } = require('query-string');
|
||||
|
||||
const logger = Logger.create('JoplinServerApi');
|
||||
@@ -245,7 +246,7 @@ export default class JoplinServerApi {
|
||||
// <hr><center>nginx/1.18.0 (Ubuntu)</center>
|
||||
// </body>
|
||||
// </html>
|
||||
throw newError(`Unknown error: ${shortResponseText()}`, response.status);
|
||||
throw newError(`Error ${response.status} ${getHttpStatusMessage(response.status)}: ${shortResponseText()}`, response.status);
|
||||
}
|
||||
|
||||
if (options.responseFormat === 'text') return responseText;
|
||||
|
||||
Reference in New Issue
Block a user