Lines 212-218
sub add {
Link Here
|
212 |
{ |
212 |
{ |
213 |
return $c->render( |
213 |
return $c->render( |
214 |
status => 400, |
214 |
status => 400, |
215 |
openapi => { error => "$_" } |
215 |
openapi => { error => "$_", error_code => 'missing_mandatory_attribute' } |
216 |
); |
216 |
); |
217 |
} |
217 |
} |
218 |
elsif ( |
218 |
elsif ( |
Lines 221-227
sub add {
Link Here
|
221 |
{ |
221 |
{ |
222 |
return $c->render( |
222 |
return $c->render( |
223 |
status => 400, |
223 |
status => 400, |
224 |
openapi => { error => "$_" } |
224 |
openapi => { error => "$_", error_code => 'invalid_attribute_type' } |
225 |
); |
225 |
); |
226 |
} |
226 |
} |
227 |
elsif ( |
227 |
elsif ( |
Lines 230-236
sub add {
Link Here
|
230 |
{ |
230 |
{ |
231 |
return $c->render( |
231 |
return $c->render( |
232 |
status => 400, |
232 |
status => 400, |
233 |
openapi => { error => "$_" } |
233 |
openapi => { error => "$_", error_code => 'non_repeatable_attribute' } |
234 |
); |
234 |
); |
235 |
} |
235 |
} |
236 |
elsif ( |
236 |
elsif ( |
Lines 239-245
sub add {
Link Here
|
239 |
{ |
239 |
{ |
240 |
return $c->render( |
240 |
return $c->render( |
241 |
status => 400, |
241 |
status => 400, |
242 |
openapi => { error => "$_" } |
242 |
openapi => { error => "$_", error_code => 'attribute_not_unique' } |
243 |
); |
243 |
); |
244 |
} |
244 |
} |
245 |
} |
245 |
} |