u
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user