fix
This commit is contained in:
parent
8441c06e9b
commit
941163822c
@ -51,7 +51,12 @@ export default class OfficeFoldersController extends ApiController {
|
||||
const officeFolderNumberExist = await this.officeFoldersService.get({where: {folder_number: officeFolderRessource.folder_number}});
|
||||
|
||||
if (officeFolderNumberExist) {
|
||||
this.httpValidationError(response, "Folder number already taken");
|
||||
this.httpValidationError(response, [{
|
||||
property: "folder_number",
|
||||
constraints: {
|
||||
unique: "folder_number must be unique",
|
||||
},
|
||||
}]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ enum HttpCodes {
|
||||
SUCCESS = 200,
|
||||
CREATED = 201,
|
||||
BAD_REQUEST = 400,
|
||||
VALIDATION_ERROR = 422,
|
||||
VALIDATION_ERROR = 409,
|
||||
INTERNAL_ERROR = 500,
|
||||
UNKNOWN_ERROR = 520,
|
||||
NOT_IMPLEMENTED = 501,
|
||||
|
Loading…
x
Reference in New Issue
Block a user