Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
fix(backend:auth): improve handling of sql errors
johavenf4b78fa2779d
diff --git a/backend/src/authentication/services/auth-methods/auth-method-database.service.ts b/backend/src/authentication/services/auth-methods/auth-method-database.service.tsindex 37c4104b..0c374338 100644--- a/backend/src/authentication/services/auth-methods/auth-method-database.service.ts+++ b/backend/src/authentication/services/auth-methods/auth-method-database.service.ts@@ -23,7 +23,10 @@ export class AuthMethodDatabase implements AuthMethod {user = await this.usersManager.findUser(loginOrEmail, false)} catch (e) {this.logger.error(`${this.validateUser.name} - ${e}`)- throw new HttpException(CONNECT_ERROR_CODE.has(e.cause?.code) ? 'Authentication service error' : e.message, HttpStatus.INTERNAL_SERVER_ERROR)+ throw new HttpException(+ CONNECT_ERROR_CODE.has(e.cause?.code) ? 'Authentication service error' : e.cause?.code || e.message,+ HttpStatus.INTERNAL_SERVER_ERROR+ )}if (!user) {this.logger.warn(`${this.validateUser.name} - login or email not found for *${loginOrEmail}*`)