Skip to content

Commit fd5d44a

Browse files
authored
fix: error message logging when run from cli (#324)
1 parent 32da58f commit fd5d44a

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,39 @@ jobs:
6666
needs:
6767
- semantic-release
6868
if: needs.semantic-release.outputs.new-release-published == 'true'
69-
runs-on: ubuntu-20.04
69+
runs-on: ubuntu-latest
7070
steps:
71-
- uses: actions/checkout@v3
71+
- id: meta
72+
uses: docker/metadata-action@v4
73+
with:
74+
images: |
75+
supabase/postgres-meta
76+
public.ecr.aws/t3w2s2c9/postgres-meta
77+
tags: |
78+
type=raw,value=v${{ needs.semantic-release.outputs.new-release-version }}
7279
7380
- uses: docker/setup-qemu-action@v2
7481
with:
7582
platforms: amd64,arm64
76-
7783
- uses: docker/setup-buildx-action@v2
7884

79-
- uses: docker/login-action@v2
85+
- name: Login to DockerHub
86+
uses: docker/login-action@v2
8087
with:
8188
username: ${{ secrets.DOCKER_USERNAME }}
8289
password: ${{ secrets.DOCKER_PASSWORD }}
8390

91+
- name: Login to ECR
92+
uses: docker/login-action@v2
93+
with:
94+
registry: public.ecr.aws
95+
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
96+
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
97+
8498
- uses: docker/build-push-action@v3
8599
with:
86-
context: .
87-
platforms: linux/amd64,linux/arm64
88100
push: true
89-
tags: supabase/postgres-meta:latest,supabase/postgres-meta:v${{ needs.semantic-release.outputs.new-release-version }}
101+
platforms: linux/amd64,linux/arm64
102+
tags: ${{ steps.meta.outputs.tags }}
103+
cache-from: type=gha
104+
cache-to: type=gha,mode=max

src/server/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,16 @@ if (EXPORT_DOCS) {
7272
await pgMeta.end()
7373

7474
if (schemasError) {
75-
throw schemasError
75+
throw new Error(schemasError.message)
7676
}
7777
if (tablesError) {
78-
throw schemasError
78+
throw new Error(tablesError.message)
7979
}
8080
if (functionsError) {
81-
throw schemasError
81+
throw new Error(functionsError.message)
8282
}
8383
if (typesError) {
84-
throw typesError
84+
throw new Error(typesError.message)
8585
}
8686

8787
console.log(

0 commit comments

Comments
 (0)