fix(fhir): bound _offset and answer a larger one with 400

An offset beyond what the database can skip reached Prisma unchecked
and answered 500. Every search route now refuses an _offset above
100000 with an invalid OperationOutcome.
This commit is contained in:
Marc-André Bombeck committed 2026-10-22 00:01:27 +02:00
1 parent 896ba233da
commit 176f21ab78
10 files changed
+111 -16

No files matched your search

+12
View File
@@ -1274,7 +1274,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
responses:
"200":
description: searchset Bundle (application/fhir+json).
@@ -1310,7 +1312,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
- in: query
name: date
schema:
@@ -1345,7 +1349,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
responses:
"200":
description: searchset Bundle (application/fhir+json).
@@ -1372,7 +1378,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
responses:
"200":
description: searchset Bundle (application/fhir+json).
@@ -1400,7 +1408,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
responses:
"200":
description: searchset Bundle (application/fhir+json).
@@ -1595,7 +1605,9 @@ paths:
- in: query
name: _offset
schema:
description: At most 100000; a larger offset is a 400 OperationOutcome.
type: number
description: At most 100000; a larger offset is a 400 OperationOutcome.
responses:
"200":
description: searchset Bundle (application/fhir+json).