diff --git a/src/controller/ComponentInformationController.ts b/src/controller/ComponentInformationController.ts index dd2cbccc331ea585598e75cb1c71c278033854df..6a2657962bfbf3416e814f9e6eab621234efd3e4 100644 --- a/src/controller/ComponentInformationController.ts +++ b/src/controller/ComponentInformationController.ts @@ -115,7 +115,8 @@ export default class ComponentInformationController extends BaseController { if(information.id != oldVersionId) { // Topic is already related by a information object which is not // the old version. - response.status(412); + // 409 - Conflict + response.status(409); this.setJSONLDResponseType(response); response.send(new APIError("Topic is already in use by another component information.")); return; diff --git a/src/controller/TypeDefinitionController.ts b/src/controller/TypeDefinitionController.ts index f070118656ec47989c7e6b720ade9a74a80707e5..5435db14045fe9ca867a46c958cd1b8cd8aafc74 100644 --- a/src/controller/TypeDefinitionController.ts +++ b/src/controller/TypeDefinitionController.ts @@ -87,8 +87,8 @@ export default class TypeDefinitionController extends BaseController { // Thus in this case someone wants to insert a type definition with a name // which already exists within the database. if(error.code == "23505") { - // 412 - Precondition Failed - response.status(412); + // 409 - Conflict + response.status(409); this.setJSONLDResponseType(response); response.send(new APIError("A type definition with this name already exists.")); return;