Skip to content

Commit c9ec7a2

Browse files
authored
feat: rename Error to GridError and add additionalProperties to error schemas (#131)
### TL;DR Added a new `GridError` schema and improved error handling in the OpenAPI specification. ### What changed? - Created a new `GridError` schema to standardize error responses - Added `additionalProperties: true` to all error schema `details` objects to allow for flexible error details - Refactored `BulkCustomerImportErrorEntry` to extend from `GridError` instead of using a nested error structure - Updated webhook response schemas to reference `GridError` instead of `Error`
1 parent 938d0ec commit c9ec7a2

17 files changed

Lines changed: 138 additions & 39 deletions

mintlify/openapi.yaml

Lines changed: 38 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 38 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type: object
2+
title: GridError
3+
properties:
4+
code:
5+
type: string
6+
description: Error code
7+
message:
8+
type: string
9+
description: Error message
10+
details:
11+
type: object
12+
description: Additional error details
13+
additionalProperties: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
allOf:
2+
- $ref: ../common/GridError.yaml
3+
- type: object
4+
description: Error information for a failed bulk import entry
5+
required:
6+
- correlationId
7+
properties:
8+
correlationId:
9+
type: string
10+
description: Platform customer ID or row number for the failed entry
11+
example: biz456

openapi/components/schemas/customers/BulkCustomerImportJob.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,7 @@ properties:
4545
type: array
4646
description: Detailed error information for failed entries
4747
items:
48-
type: object
49-
required:
50-
- correlationId
51-
- error
52-
properties:
53-
correlationId:
54-
type: string
55-
description: Platform customer ID or row number for the failed entry
56-
example: biz456
57-
error:
58-
$ref: ../common/Error.yaml
48+
$ref: BulkCustomerImportErrorEntry.yaml
5949
completedAt:
6050
type: string
6151
format: date-time

openapi/components/schemas/errors/Error400.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ properties:
7575
details:
7676
type: object
7777
description: Additional error details
78+
additionalProperties: true

openapi/components/schemas/errors/Error401.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ properties:
2525
details:
2626
type: object
2727
description: Additional error details
28+
additionalProperties: true

openapi/components/schemas/errors/Error403.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ properties:
2929
details:
3030
type: object
3131
description: Additional error details
32+
additionalProperties: true

openapi/components/schemas/errors/Error404.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,4 @@ properties:
3737
details:
3838
type: object
3939
description: Additional error details
40+
additionalProperties: true

openapi/components/schemas/errors/Error409.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ properties:
2525
details:
2626
type: object
2727
description: Additional error details
28+
additionalProperties: true

0 commit comments

Comments
 (0)