mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 11:56:48 +01:00
Return proper status code when encountering an error
This commit is contained in:
parent
22a2a40072
commit
9eda65d089
@ -1199,7 +1199,7 @@ app.post("/v2/editcharacterattribute", jsonParser, async function (request, resp
|
||||
response.status(400).send({message: `Validation failed for card ${character.name}`, field: validator.getValidationError});
|
||||
}
|
||||
} catch (exception) {
|
||||
response.status(400).send({message: 'Unexpected error while saving character.', error: exception.toString()});
|
||||
response.status(500).send({message: 'Unexpected error while saving character.', error: exception.toString()});
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user