Skip to content

Commit

Permalink
Add a specific message for the 577 error code
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-Holbrook committed Nov 20, 2024
1 parent f4c92e0 commit 59c8ef0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/debugSession/BrightScriptDebugSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,19 @@ export class BrightScriptDebugSession extends BaseDebugSession {
packageIsPublished = true;
}).catch(async (e) => {
const statusCode = e?.results?.response?.statusCode;
const message = e.message as string;
let message = e.message as string;
if (statusCode && statusCode !== 200) {
this.showPopupMessage(message, 'error', true);
await this.shutdown(message);
switch (statusCode) {
case 577:
message = 'DebugServer: Error (577) - Your device requires a system update before accepting connections. Follow these instructions to manually check for updates https://support.roku.com/article/208755668.'

Check failure on line 569 in src/debugSession/BrightScriptDebugSession.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest)

Missing semicolon
this.showPopupMessage(message, 'error', true);
await this.shutdown(message);
break;
default:
this.showPopupMessage(message, 'error', true);
await this.shutdown(message);
break;
}
throw e;
}
this.logger.error(e);
Expand Down

0 comments on commit 59c8ef0

Please sign in to comment.