Skip to content

Commit

Permalink
Add better error logging for SciServer Files. Fixes #1668
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb committed Apr 22, 2020
1 parent 3019678 commit c96c56a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/common/storage/backends/sciserver-files/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ define([
opts.headers = opts.headers || {};
opts.headers['X-Auth-Token'] = token;
try {
return StorageClient.prototype.fetch.call(this, url, opts);
const response = await StorageClient.prototype.fetch.call(this, url, opts);
return response;
} catch (errRes) {
const err = await this.getErrorMsg(errRes);
const err = errRes instanceof Error ? errRes :
await this.getErrorMsg(errRes);
throw new Error(`SciServerFiles ${action} failed: ${err}`);
}
};
Expand Down

0 comments on commit c96c56a

Please sign in to comment.