Skip to content

Commit

Permalink
Experiment with error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Apr 19, 2024
1 parent 2fccedd commit 3e99415
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions sources/src/dependency-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,7 @@ async function submitDependencyGraphs(dependencyGraphFiles: string[]): Promise<v
await submitDependencyGraphFile(dependencyGraphFile)
} catch (error) {
if (error instanceof RequestError) {
core.info(`Caught error, printing stack trace`)
core.info(error.stack || 'No stack trace')
core.info('-----------------------------------')
error.message = translateErrorMessage(dependencyGraphFile, error)

core.info(`Translated error, printing stack trace`)
core.info(error.stack || 'No stack trace')
core.info('-----------------------------------')
}
throw error
}
Expand Down Expand Up @@ -216,12 +209,6 @@ function markProcessed(dependencyGraphFile: string): void {
}

function warnOrFail(config: DependencyGraphConfig, option: String, error: unknown): void {
if (error instanceof Error) {
core.info(`Recaught error, printing stack trace`)
core.info(error.stack || 'No stack trace')
core.info('-----------------------------------')
}

if (!config.getDependencyGraphContinueOnFailure()) {
throw new JobFailure(error)
}
Expand Down

0 comments on commit 3e99415

Please sign in to comment.