mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor(server)!: structured validation error responses (#28204)
* refactor(server)!: structured validation error responses * refactor(server): clarify comment on removing duplicate HTTP response fields * enhance validation error tests * make path and message required * fmt * fix e2e test * fmt * feat: enhance error handling in getServerErrorMessage function
This commit is contained in:
@@ -31,7 +31,9 @@ describe(MaintenanceController.name, () => {
|
||||
});
|
||||
expect(status).toBe(400);
|
||||
expect(body).toEqual(
|
||||
errorDto.badRequest(['[restoreBackupFilename] Backup filename is required when action is restore_database']),
|
||||
errorDto.validationError([
|
||||
{ path: ['restoreBackupFilename'], message: 'Backup filename is required when action is restore_database' },
|
||||
]),
|
||||
);
|
||||
expect(ctx.authenticate).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user