1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Fixed WebDAV error handling

This commit is contained in:
Laurent Cozic
2018-01-28 17:36:11 +00:00
parent 4531838217
commit 2780c38c45
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ class WebDavApi {
const json = await loadResponseJson();
if (json['d:error']) {
if (json && json['d:error']) {
const code = json['d:error']['s:exception'] ? json['d:error']['s:exception'].join(' ') : response.status;
const message = json['d:error']['s:message'] ? json['d:error']['s:message'].join("\n") : shortResponseText();
throw new JoplinError(method + ' ' + path + ': ' + message + ' (' + code + ')', response.status);