u
This commit is contained in:
@@ -20,6 +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')) return 400;
|
||||
return 500;
|
||||
}
|
||||
|
||||
@@ -84,7 +85,7 @@ export function register(app, basePath = '') {
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/StockAdjustmentResult'
|
||||
* 400:
|
||||
* description: Missing fields, invalid amount, or no company selected
|
||||
* description: Missing fields, invalid amount, father article cannot have stock, or no company selected
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
|
||||
Reference in New Issue
Block a user