Make error reporter not return a promise and add more environment possibilities

This commit is contained in:
fragosti
2018-07-12 15:50:13 -07:00
parent ddb70a89ad
commit ac5588c7c4
14 changed files with 51 additions and 43 deletions

View File

@@ -154,7 +154,7 @@ You can see and fill it here: ${this.state.shareLink}`);
if (response.status !== 200 || bodyObj.status_code !== 200) {
// TODO: Show error message in UI
logUtils.log(`Unexpected status code: ${response.status} -> ${responseBody}`);
await errorReporter.reportAsync(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`));
errorReporter.report(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`));
return '';
}
return bodyObj.data.url;