Skip to content

Commit c1ce817

Browse files
committed
handles 403 errors from the HM App
1 parent 61b740e commit c1ce817

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/proud-cougars-confess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@hypermod/cli': patch
3+
---
4+
5+
Handle 403 errs returned from App PKG fetches

packages/cli/src/fetchers/app.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ export async function fetchHmPkg(slug: string, dir: string) {
5050
throw new Error(`Transform not found: ${slug}`);
5151
}
5252

53+
if (res.status === 403) {
54+
throw new Error(`Access forbidden for transform: ${slug}`);
55+
}
56+
5357
if (!res.ok) {
5458
throw new Error(`Error fetching transform: ${res.statusText}`);
5559
}

0 commit comments

Comments
 (0)