Better messaging on low-level network errors (#814).
This commit is contained in:
parent
7b1a7c7f31
commit
0e3a66c829
@ -137,9 +137,15 @@ export function fetchJson(connection: string | ConnectionInfo, json?: string, pr
|
||||
try {
|
||||
response = await getUrl(url, options);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
response = (<any>error).response;
|
||||
if (response == null) {
|
||||
logger.throwError("missing response", Logger.errors.SERVER_ERROR, {
|
||||
serverError: error,
|
||||
url: url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let body = response.body;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user