fix: Adjusts in return errors

This commit is contained in:
Davidson Gomes
2023-07-27 10:27:41 -03:00
parent 38409d9336
commit 332ec69ee8
5 changed files with 73 additions and 71 deletions

View File

@@ -5,7 +5,7 @@ export class UnauthorizedException {
throw {
status: HttpStatus.UNAUTHORIZED,
error: 'Unauthorized',
message: objectError.length > 0 ? objectError : undefined,
message: objectError.length > 0 ? objectError : 'Unauthorized',
};
}
}