handle unexpected error types opaquely
This commit is contained in:
+6
-2
@@ -60,8 +60,12 @@ async function run(): Promise<void> {
|
|||||||
core.setFailed(
|
core.setFailed(
|
||||||
`Dependency review is not supported on this repository. Please ensure that Dependency graph is enabled, see https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/settings/security_analysis`
|
`Dependency review is not supported on this repository. Please ensure that Dependency graph is enabled, see https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/settings/security_analysis`
|
||||||
)
|
)
|
||||||
} else (error instanceof Error) {
|
} else {
|
||||||
core.setFailed(error.message)
|
if (error instanceof Error) {
|
||||||
|
core.setFailed(error.message)
|
||||||
|
} else {
|
||||||
|
core.setFailed('Unexpected fatal error')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user