fix(engine): use the bad request status instead of server error (#434)
Description
Use the bad request status instead of server error
Related issue
Examples
GET /api/admin/config
Status code: 400
{
"code": "BAD_REQUEST",
"message": "config is only available in logical mode"
}
POST /api/admin/test-db-source
Status code: 400
{
"code": "BAD_REQUEST",
"message": "the endpoint is only available in the Logical mode of the data retrieval"
}
Checklist
-
MR description has been reviewed -
MR changes are functionally tested -
MR does NOT have text changes OR there are text changes and they have been reviewed -
MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed -
MR does NOT have UI changes OR there are UI changes and they have been reviewed
Closes #434 (closed)