This commit is contained in:
seb
2026-10-16 12:35:04 +02:00
parent 144bf0ca43
commit a560a78f4d
10 changed files with 8 additions and 704 deletions

View File

@@ -27,6 +27,7 @@ function warehouseErrorStatus(error) {
if (error.message === 'Name required') return 400;
if (error.message === 'Warehouse already exists') return 409;
if (error.message === 'Warehouse in use in ledger') return 409;
if (error.message === 'Cannot delete the last warehouse while articles have stock tracking enabled') return 409;
if (error.message === 'Invalid warehouse order') return 400;
if (error.message === 'Invalid sort') return 400;
return 500;
@@ -543,7 +544,7 @@ export function register(app, basePath = '') {
* schema:
* $ref: '#/components/schemas/Error'
* 409:
* description: Warehouse in use in ledger
* description: Warehouse in use in ledger or articles have stock tracking enabled
* content:
* application/json:
* schema: