u
This commit is contained in:
@@ -20,7 +20,7 @@ function stockErrorStatus(error) {
|
||||
if (error.message?.includes('Amount must be')) return 400;
|
||||
if (error.message?.includes('Invalid amount')) return 400;
|
||||
if (error.message === 'No items to adjust') return 400;
|
||||
if (error.message?.includes('cannot have stock') || error.message?.includes('A father article cannot have') || error.message?.includes('father article') || error.message?.includes('Stückliste')) return 400;
|
||||
if (error.message?.includes('cannot have stock') || error.message?.includes('A parent article cannot have') || error.message?.includes('parent article') || error.message?.includes('Stückliste')) return 400;
|
||||
if (error.message?.includes('Stock tracking is disabled')) return 409;
|
||||
return 500;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export function register(app, basePath = '') {
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/StockAdjustmentResult'
|
||||
* 400:
|
||||
* description: Missing fields, invalid amount, father article cannot have stock, or no company selected
|
||||
* description: Missing fields, invalid amount, parent article cannot have stock, or no company selected
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
|
||||
Reference in New Issue
Block a user