Skip to content

Resolve failed launch on CodeAlly #527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ts error updates
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Nov 21, 2021
commit 055024e090b78d501c7a1c903ced6a84fdcfd6c4
6 changes: 3 additions & 3 deletions src/actions/onStartup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ const onStartup = async (context: Context): Promise<void> => {
const tutorial = await tutorialRes.json()
send({ type: 'START_TUTORIAL_FROM_URL', payload: { tutorial } })
return
} catch (e) {
} catch (e: any) {
// on failure to load a tutorial url fallback to NEW
console.log(`Failed to load tutorial from url ${TUTORIAL_URL} with error "${e.message}"`)
throw new Error(`Failed to load tutorial from url ${TUTORIAL_URL} with error "${e.message}"`)
}
}
// NEW from start click
Expand All @@ -56,7 +56,7 @@ const onStartup = async (context: Context): Promise<void> => {
const { position } = await context.onContinue(tutorial)
// communicate to client the tutorial & stepProgress state
send({ type: 'LOAD_STORED_TUTORIAL', payload: { env, tutorial, position } })
} catch (e) {
} catch (e: any) {
const error = {
type: 'UnknownError',
message: `Location: Editor startup\n\n${e.message}`,
Expand Down
2 changes: 1 addition & 1 deletion src/actions/onTutorialConfigContinue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const onTutorialConfigContinue = async (action: T.Action, context: Context): Pro
if (tutorialToContinue.config?.webhook) {
setupWebhook(tutorialToContinue.config.webhook)
}
} catch (e) {
} catch (e: any) {
const error = {
type: 'UnknownError',
message: `Location: Editor tutorial continue config.\n\n ${e.message}`,
Expand Down
2 changes: 1 addition & 1 deletion src/services/hooks/utils/openFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const openFiles = async (files: string[] = []): Promise<void> => {
const absoluteFilePath = join(wr, filePath)
const doc = await vscode.workspace.openTextDocument(absoluteFilePath)
await vscode.window.showTextDocument(doc, vscode.ViewColumn.One)
} catch (error) {
} catch (error: any) {
console.log(`Failed to open file ${filePath}: ${error.message}`)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/hooks/utils/runCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const runCommands = async (commands: string[] = []): Promise<void> => {
try {
result = await exec({ command })
console.log(result)
} catch (error) {
} catch (error: any) {
console.error(`Command failed: ${error.message}`)
send({ type: 'COMMAND_FAIL', payload: { process: { ...process, status: 'FAIL' } } })
return
Expand Down
2 changes: 1 addition & 1 deletion src/services/reset/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const reset = async ({ branch, hash }: Input): Promise<void> => {
await exec({
command: `git reset --hard ${hash}`,
})
} catch (error) {
} catch (error: any) {
console.error('Error resetting')
console.error(error.message)
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/testRunner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const createTestRunner = (data: TT.Tutorial, callbacks: Callbacks): ((params: an
}
logger('COMMAND', command)
result = await exec({ command, dir: testRunnerConfig.directory })
} catch (err) {
} catch (err: any) {
result = { stdout: err.stdout, stderr: err.stack }
}

Expand Down