-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
breaking changeA bug fix or enhancement that would cause a breaking changeA bug fix or enhancement that would cause a breaking changeideaNeeds of discussion to become an enhancement, not ready for implementationNeeds of discussion to become an enhancement, not ready for implementation
Description
Problem
When Singular fails, we return a 406 status code and:
{
"code": "PGRST116",
"message": "Cannot coerce the result to a single JSON object",
"details": "The result contains 0 rows",
"hint": null
}But the error code doesn't differentiate between 0 or multiple rows, the only way to do is to parse the error message, which is fickle.
Solution
Return different error codes for each case, let's use the next available codes from group 1. PGRST129 for the 0 case and PGRST130 for multiple.
This would be a breaking change because PGRST116 would no longer be used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changeA bug fix or enhancement that would cause a breaking changeA bug fix or enhancement that would cause a breaking changeideaNeeds of discussion to become an enhancement, not ready for implementationNeeds of discussion to become an enhancement, not ready for implementation