Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
When using the Public API to retrieve a single row (endpoint for retrieving a single row) and the provided row ID corresponds to a non-existing entry, a 400 error is thrown when it should be a 404.
To Reproduce
Steps to reproduce the behavior:
Submit a valid request to /api/public/v1/tables/<table-id>/rows/<row-id> where table-id or row-id corresponds to missing data
Hosting
Describe the bug
When using the Public API to retrieve a single row (endpoint for retrieving a single row) and the provided row ID corresponds to a non-existing entry, a 400 error is thrown when it should be a 404.
To Reproduce Steps to reproduce the behavior:
/api/public/v1/tables/<table-id>/rows/<row-id>
wheretable-id
orrow-id
corresponds to missing dataExpected behavior
In step 2 above, observe 404 response using RFC 7807-compliant problem:
Note: can also be 'row not found' depending on the evaluation
Desktop (please complete the following information):
Additional context
Perhaps a this code (L34) should be checked for an empty reponse in the event there's missing data:
https://github.com/Budibase/budibase/blob/77d7a5ed70d84bd4171038af37d5abbc7310fc52/packages/server/src/api/controllers/row/index.ts#L33-L43