File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
packages/provider-github/src/lib Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @rnef/provider-github ' : patch
3+ ---
4+
5+ feat: handle 404 from github gracefully
Original file line number Diff line number Diff line change @@ -91,7 +91,23 @@ Update the token under "${color.bold(
9191 ) } " key in ${ color . cyan ( 'rnef.config.mjs' ) } config file.
9292
9393📘 Read more about generating a new token: ${ color . cyan (
94- 'https://www.rnef.dev/docs/remote-cache/github-actions/configuration#generate-github-personal-access-token-for-downloading-cached-builds'
94+ 'https://rnef.dev/docs/remote-cache/github-actions/configuration#generate-github-personal-access-token-for-downloading-cached-builds'
95+ ) } `
96+ ) ;
97+ }
98+ if ( ( error as { message : string } ) . message . includes ( '404 Not Found' ) ) {
99+ throw new RnefError (
100+ `Failed to fetch GitHub artifacts due to "404 Not Found" error. This can happen for the following reasons:
101+ - permission mismatch between your GitHub Personal Access Token and the repository
102+ - you're blocked by the owner of the repository
103+ - repository address is incorrect
104+
105+ Make sure the repository information and token under "${ color . bold (
106+ 'remoteCacheProvider'
107+ ) } " key in ${ color . cyan ( 'rnef.config.mjs' ) } config file is valid.
108+
109+ 📘 Read more about generating a new token: ${ color . cyan (
110+ 'https://rnef.dev/docs/remote-cache/github-actions/configuration#generate-github-personal-access-token-for-downloading-cached-builds'
95111 ) } `
96112 ) ;
97113 }
You can’t perform that action at this time.
0 commit comments