Fix error handling

This commit is contained in:
Citlali del Rey 2022-12-17 10:50:22 -08:00
parent fba2a0f6f7
commit 7259fe5348
Signed by: nullobsi
GPG Key ID: 933A1F44222C2634
1 changed files with 10 additions and 7 deletions

View File

@ -65,14 +65,17 @@ sub update_query($c, $query) {
$app_name = $meta->{app_name};
};
$c->render(status => 400, openapi =>{
error => {
reason => "INVALID_PARAM",
details => "Parameter 'meta' is invalid.",
},
}) if $@;
if ($@) {
$c->render(status => 400, openapi =>{
error => {
reason => "INVALID_PARAM",
details => "Parameter 'meta' is invalid.",
},
});
return 0;
}
return 0;
}
# Not supporting meta.