refactor: fix types

This commit is contained in:
syuilo
2023-02-09 10:46:01 +09:00
parent 7afee5977f
commit 21331e53fe
6 changed files with 17 additions and 13 deletions

View File

@@ -162,7 +162,7 @@ export class SignupApiService {
token: secret,
};
} catch (err) {
throw new FastifyReplyError(400, err);
throw new FastifyReplyError(400, typeof err === 'string' ? err : (err as Error).toString());
}
}
}
@@ -195,7 +195,7 @@ export class SignupApiService {
return this.signinService.signin(request, reply, account as ILocalUser);
} catch (err) {
throw new FastifyReplyError(400, err);
throw new FastifyReplyError(400, typeof err === 'string' ? err : (err as Error).toString());
}
}
}