diff --git a/js/src/grpc-client.ts b/js/src/grpc-client.ts index e404c75..eaa4d69 100644 --- a/js/src/grpc-client.ts +++ b/js/src/grpc-client.ts @@ -134,9 +134,8 @@ export class DateiLagerGrpcClient { } catch (error) { if (error instanceof RpcError && error.code == "ALREADY_EXISTS") { throw new ProjectAlreadyExistsError(`project id ${project} already exists`); - } else { - throw error; } + throw error; } } diff --git a/js/src/utils/errors.ts b/js/src/utils/errors.ts index 5ce1f10..94bc9e8 100644 --- a/js/src/utils/errors.ts +++ b/js/src/utils/errors.ts @@ -1,5 +1 @@ -export class ProjectAlreadyExistsError extends Error { - constructor(msg: string) { - super(msg); - } -} +export class ProjectAlreadyExistsError extends Error {}