generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: log message with dashboard url when unexpected error (#13)
- Loading branch information
1 parent
31a6c67
commit 1e01692
Showing
5 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
import { setFailed } from '@actions/core' | ||
import { endGroup, setFailed } from '@actions/core' | ||
import { run } from './run' | ||
|
||
try { | ||
run() | ||
} catch (e) { | ||
run().catch((e) => { | ||
endGroup() | ||
|
||
setFailed(e instanceof Error ? e.message : `${e}`) | ||
} | ||
|
||
console.log( | ||
`\nThere was an unexpected error. It's possible that your Cloudflare Pages deploy is still in progress or was successful. Go to https://dash.cloudflare.com and visit your Pages dashboard for more details.`, | ||
) | ||
|
||
return Promise.reject(e) | ||
}) |