Skip to content

Commit

Permalink
fix error logs (cBioPortal#4904)
Browse files Browse the repository at this point in the history
Co-authored-by: Bryan Lai <[email protected]>
  • Loading branch information
gblaih and Bryan Lai authored May 8, 2024
1 parent 8a32a0f commit debadce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/AppStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export class AppStore {

if (error.status && /400|500|5\d\d|403/.test(error.status)) {
sendSentryMessage('ERROR DIALOG SHOWN:' + error);
this.siteErrors.push(new SiteError(new Error(error)));
if (error instanceof Error) {
this.siteErrors.push(new SiteError(error));
} else {
this.siteErrors.push(new SiteError(new Error(error)));
}
}
});
}
Expand Down

0 comments on commit debadce

Please sign in to comment.