Laurence Isla and GitHub
5d3d09923f
refactor: unDRY PGRST prefix in errors for better search/grep
2024-05-21 14:34:00 -05:00
Laurence Isla and GitHub
7671d63f06
refactor: add isParent flag to O2O relationships
...
It allows to identify the side with the FK when isParent == False
2024-05-21 12:11:27 -05:00
Taimoor Zaeem and Steve Chavez
5cc32c7f87
fix: fix incorrect 413 error on pg 54* errors
2024-05-20 18:59:33 -05:00
steve-chavez
d5a4c5609e
refactor: greppable 57P01 error code
2024-05-19 19:58:27 -05:00
Taimoor Zaeem and Steve Chavez
21bc48ad9a
fix: fix wrong 503 Service Unavailable on pg error 53400
2024-05-06 07:54:11 -05:00
Laurence Isla and GitHub
69bbce5b32
feat: improve PGRST121 error message
...
* Clarify the message field
* Show failed MESSAGE or DETAIL in the the PGRST121 error's details field
* Show the correct JSON format in the hint field
2024-04-24 13:33:10 -05:00
Taimoor Zaeem and Steve Chavez
88abf600c4
fix: fix wrong http status on pg error 42P17 infinite recursion
2024-04-22 13:40:07 -05:00
Taimoor Zaeem and Steve Chavez
973201a8d3
fix: remove rejected mediatype application/vnd.pgrst.object+json from response
2024-04-13 16:07:38 -05:00
Laurence Isla and GitHub
460259548d
perf: fix space leaks by downgrading fuzzyset to v0.2.4
2024-04-11 14:13:20 -05:00
steve-chavez
2543b8d724
fix: clarify PGRST204 error message
2024-04-01 19:03:14 -05:00
Wolfgang Walther
2466f4e738
fix: Return 406 instead of 415 for non-acceptable media type
...
415 is for Content-Type and 406 for Accept headers.
2024-02-15 19:01:12 +01:00
steve-chavez
45cabacdcc
fix: wrong subquery error returning as 400 status
2024-02-02 22:08:56 -05:00
Wolfgang Walther and Wolfgang Walther
6682baebd2
nix: Update nixpkgs and build with GHC 9.4.8
2024-01-18 18:54:33 +01:00
Taimoor Zaeem and GitHub
0b77098460
feat: add max-affected preference to prefer header ( #3083 )
2023-12-18 18:35:23 -05:00
steve-chavez
3d56f8435d
chore: delete dead error codes
2023-11-28 10:25:25 -05:00
Laurence Isla and Steve Chavez
33891e3a73
feat: log all internal database errors to stderr
2023-11-27 23:06:40 -05:00
Tim Abdulla and GitHub
1c60b50e2e
Add aggregate functions ( #2925 )
...
The aggregate functions SUM(), MAX(), MIN(), AVG(), and COUNT() are now supported.
2023-11-23 14:03:03 -05:00
steve-chavez
82b38341bf
feat: sql handlers for custom media types
...
* test text/html and drop HtmlRawOutputSpec.hs
* all tests passing, removed all pendingWith
* make functions compatible with pg <= 12
* move custom media types tests to own spec
* anyelement aggregate
* apply aggregates without a final function
* overriding works
* overriding anyelement with particular agg
* cannot override vendored media types
* plan spec works with custom aggregate
* renamed media types to make clear which ones are overridable
* correct content negotiation with same weight
* text/tab-separated-values media type
* text/csv with BOM plus content-disposition header
2023-10-26 09:04:02 -05:00
Laurence Isla and GitHub
056c748c5f
refactor: DRY and enforce error format
2023-10-10 11:42:36 -05:00
steve-chavez
2aa58164ab
refactor: move errors to ApiRequestError
2023-10-06 01:16:45 -03:00
steve-chavez
df08d7f3ff
refactor: rename JSONParseError to PGRSTParseError
...
The error name is too generic otherwise.
2023-10-06 01:16:45 -03:00
steve-chavez
3dd292be46
refactor: DRY application/json on Error.hs
...
Small refactor to help with:
https://github.com/PostgREST/postgrest/issues/2901
2023-10-06 01:16:45 -03:00
Taimoor Zaeem and Steve Chavez
3c1cdd434a
feat: add handling=strict/lenient for Prefer header
2023-09-27 15:00:52 -03:00
Taimoor Zaeem and GitHub
07fef25591
feat: allow full response control when raising exceptions
2023-09-01 14:02:03 -05:00
Taimoor Zaeem and GitHub
fbf9bf21c2
feat: add optional nulls=stripped parameter for mediatypes applicatio… ( #2894 )
2023-08-09 18:49:22 -05:00
Taimoor Zaeem and GitHub
d0a71de2da
chore: improve details field of the singular error response ( #2876 )
2023-08-01 19:37:54 -05:00
steve-chavez
77cd9387d4
Revert "refactor: plan media type"
...
This reverts commit 3cd3a3f8c6 .
2023-06-18 15:27:25 -05:00
steve-chavez
3cd3a3f8c6
refactor: plan media type
2023-06-17 23:00:32 -05:00
steve-chavez
07cb0b582e
feat: recover on pg_terminate_backend
2023-06-06 14:41:37 -05:00
steve-chavez
d54a2f48de
refactor: move checkIsFatal to AppState
2023-06-06 14:41:37 -05:00
steve-chavez
bcce7b1c53
fix: stop retrying on "no password supplied"
2023-06-06 14:41:37 -05:00
steve-chavez
ce378e6b3a
refactor: clarify Scalar type
...
It now contains the type of the scalar. This way we can discriminate the
void type in a more obvious way.
2023-04-13 18:17:43 -05:00
steve-chavez
feadf59bb3
refactor: rename Proc module to Routine
...
Assuming that functions=procedures is wrong since pg11, which introduced
real stored procedures.
2023-04-13 18:17:43 -05:00
Laurence Isla and GitHub
1aed55be68
Ignore the Range header when the method is different than GET
...
fix: bug when using Range header on PATCH/DELETE
- Fix the "message": "syntax error at or near \"RETURNING\"" error
- Fix doing a limited update/delete when an order query parameter was present
breaking: The Range header is now only considered on GET requests and is ignored for any other method
- Other methods should use the `limit/offset` query parameters for sub-ranges
- PUT requests no longer return an error when this header is present
2023-04-03 10:40:25 -05:00
Steve Chavez and GitHub
6a79de67ce
fix: log to stderr on AcquisitionTimeoutUsageError ( #2667 )
...
* refactor: remove uneeded type on checkIsFatal
* dry with a logPgrstError function
2023-02-17 17:38:31 -05:00
Laurence Isla and GitHub
60f4446fd8
Change inaccurate error codes to new ones
...
- Code for column is not found is PGRST204
- Code for timed out when acquiring connection to db is PGRST003
2023-02-09 14:57:51 -05:00
Tuan Le and Steve Chavez
8aa79086d2
fix: consider authentication failure as a fatal error
2023-01-20 13:51:28 -05:00
steve-chavez
be6c30a0fb
refactor: dry RPC param parsing
2023-01-18 12:26:13 -05:00
Alexander Ljungberg and GitHub
43ad6d6aa0
feat: validate ?columns mutation targets based on schema cache ( #2542 )
...
This returns an error for trying to update or insert into invalid columns, without hitting the database. This change also switches from `json_populate_recordset` for these operations `json_to_recordset` which should make no functional difference except allowing future flexibility.
2023-01-07 22:08:30 -05:00
Laurence Isla and GitHub
5a660e0cbe
Add suggestions with fuzzy text search when no relationship is found ( #2583 )
2022-12-15 18:33:15 -05:00
steve-chavez
3773cce246
feat: null filters on embedded resources
2022-12-12 17:14:54 -05:00
Laurence Isla and GitHub
aecc53d8f9
fix: clarify error messages for functions
...
Move explanation on single unnamed parameters to the error details
2022-12-09 14:34:38 -05:00
Laurence Isla and GitHub
9e567216e9
feat: hint function names/parameters on error
2022-12-01 17:17:45 -05:00
steve-chavez
cb99270a8f
fix: bad M2M embed on RPC
2022-11-18 17:49:24 -05:00
steve-chavez
cca0b5ae66
messages: better error for related order
2022-11-16 21:26:16 -05:00
steve-chavez
2aa0e091bb
feat: add spread embeds
2022-11-16 21:26:16 -05:00
steve-chavez
78d45b4e32
feat: add related orders
2022-11-08 17:28:50 -05:00
Steve Chavez and GitHub
0fbb116dd2
add basic ARCHITECTURE.md ( #2503 )
...
* refactor: move ApiRequest a top-level module
* refactor: rename DbStructure to SchemaCache
* refactor: GucHeader inside Response
* refactor: admin app to Workers
2022-10-10 11:24:45 -05:00
steve-chavez
11385bbd9f
refactor: move binaryField to ApiRequest
2022-10-01 11:05:49 -05:00
Laurence Isla and GitHub
d5e662567b
fix: add error body when Prefer: count=exact is used and offset is out of bounds
...
* Adds error body when Prefer: count=exact is used and offset is out of bounds
* Adds details to differentiate between negative limits, lower boundaries greater than upper boundaries and out of bound ranges
2022-09-15 18:39:37 -05:00