A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
TypeScript agent-skillsaidsh-pluginhacktoberfestjavascriptmcp-serverreactresume-builderself-hostedtypescript
fix: throw appropriate errors when connecting to storage bucket, closes #1561
Amruth Pillaia66107668600
diff --git a/apps/server/src/storage/storage.service.ts b/apps/server/src/storage/storage.service.tsindex 8e939fcab..1a7071bee 100644--- a/apps/server/src/storage/storage.service.ts+++ b/apps/server/src/storage/storage.service.ts@@ -67,8 +67,21 @@ export class StorageService implements OnModuleInit {this.bucketName,);- await this.client.makeBucket(this.bucketName);- await this.client.setBucketPolicy(this.bucketName, bucketPolicy);+ try {+ await this.client.makeBucket(this.bucketName);+ } catch (error) {+ throw new InternalServerErrorException(+ "There was an error while creating the storage bucket.",+ );+ }++ try {+ await this.client.setBucketPolicy(this.bucketName, bucketPolicy);+ } catch (error) {+ throw new InternalServerErrorException(+ "There was an error while applying the policy to the storage bucket.",+ );+ }this.logger.log("A new storage bucket has been created and the policy has been applied successfully.",@@ -77,9 +90,7 @@ export class StorageService implements OnModuleInit {this.logger.log("Successfully connected to the storage service.");}} catch (error) {- throw new InternalServerErrorException(- "There was an error while creating the storage bucket.",- );+ throw new InternalServerErrorException(error);}}diff --git a/package.json b/package.jsonindex e0ba8b82b..b44e9ae3c 100644--- a/package.json+++ b/package.json@@ -137,7 +137,7 @@"@nestjs/terminus": "^10.1.1","@paralleldrive/cuid2": "^2.2.2","@pdf-lib/fontkit": "^1.1.1",- "@phosphor-icons/react": "^2.0.14",+ "@phosphor-icons/react": "^2.0.15","@prisma/client": "^5.6.0","@radix-ui/react-accordion": "^1.1.2","@radix-ui/react-alert-dialog": "^1.0.5",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a348bce5e..4ca481bb9 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -78,8 +78,8 @@ dependencies:specifier: ^1.1.1version: 1.1.1'@phosphor-icons/react':- specifier: ^2.0.14- version: 2.0.14([email protected])([email protected])+ specifier: ^2.0.15+ version: 2.0.15([email protected])([email protected])'@prisma/client':specifier: ^5.6.0version: 5.6.0([email protected])@@ -4420,8 +4420,8 @@ packages:typescript: 5.3.2dev: true- resolution: {integrity: sha512-VaZ7/JEQ7dW+Up23l7t6lqJ3dPJupM03916Pat+ZOLX1vex9OeX9t8RZLJWt0oVrdc/GcrAyRD5FESDeP+M4tQ==}+ resolution: {integrity: sha512-PQKNcRrfERlC8gJGNz0su0i9xVmeubXSNxucPcbCLDd9u0cwJVTEyYK87muul/svf0UXFdL2Vl6bbeOhT1Mwow==}engines: {node: '>=10'}peerDependencies:react: '>= 16.8'