-
Notifications
You must be signed in to change notification settings - Fork 3
feat: rename Error to GridError and add additionalProperties to error schemas #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rename Error to GridError and add additionalProperties to error schemas #131
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryThis PR standardizes error handling by introducing a new Major changes:
Critical issue:
Confidence Score: 2/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/GridError.yaml | New GridError schema created with additionalProperties enabled for flexible error details |
| openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml | Refactored to extend GridError with allOf, cleaner schema composition |
| openapi/paths/transfers/transfer_in.yaml | Removed Idempotency-Key parameter - unrelated to PR title and reverts PR #138 |
| openapi/paths/transfers/transfer_out.yaml | Removed Idempotency-Key parameter - unrelated to PR title and reverts PR #138 |
| openapi.yaml | Bundled schema reflects all changes including unintended Idempotency-Key removal |
| mintlify/openapi.yaml | Copy of bundled schema with same issues as openapi.yaml |
Sequence Diagram
sequenceDiagram
participant Client
participant API
participant ErrorHandler
participant Schema
Note over Client,Schema: Error Handling Flow with GridError
Client->>API: Request to API endpoint
API->>API: Process request
alt Request succeeds
API->>Client: 200 OK with response
else Request fails (400/401/403/404/409/410/412/424/500/501)
API->>ErrorHandler: Generate error response
ErrorHandler->>Schema: Use GridError for webhooks
Note over Schema: GridError schema with<br/>additionalProperties: true
Schema-->>ErrorHandler: Flexible error structure
ErrorHandler->>ErrorHandler: Add code, message, details
ErrorHandler->>API: Error response object
API->>Client: Error response with status code
end
Note over Client,Schema: Bulk Import Error Flow
Client->>API: POST bulk customer import
API->>API: Process bulk entries
loop For each failed entry
API->>ErrorHandler: Create BulkCustomerImportErrorEntry
Note over ErrorHandler: Extends GridError via allOf<br/>Adds correlationId field
ErrorHandler->>ErrorHandler: Add correlationId + error details
end
API->>Client: BulkCustomerImportJob response<br/>with errors array
6432728 to
e5749d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
Incomplete migration: still references `Error.yaml` instead of `GridError.yaml`. For consistency with the rest of this PR, this should be updated to use `GridError.yaml`.
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
68ab09c to
5786fb9
Compare
e5749d2 to
a27f6e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
Inconsistent error schema reference - should use `GridError.yaml` instead of `Error.yaml` to match the PR's goal of standardizing on `GridError`
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
5786fb9 to
79467e5
Compare
a27f6e6 to
a1379cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
Update this to reference `GridError` for consistency with other error responses
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise. |
79467e5 to
9f4bbd9
Compare
a1379cd to
d0f0475
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
inconsistent reference - should use `GridError` instead of `Error` to match the pattern established in this PR
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
d0f0475 to
94a379a
Compare
9f4bbd9 to
4e17d69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
this should reference `GridError.yaml` not `Error.yaml` for consistency with the rest of the PR
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
4e17d69 to
5022722
Compare
94a379a to
c72b46f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
reference to `Error.yaml` should be updated to `GridError.yaml` for consistency
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
99a29c9 to
d8d7c4d
Compare
03ebf04 to
db286da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
Still references old `Error.yaml` instead of `GridError.yaml`
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
db286da to
493e9f8
Compare
d8d7c4d to
1c31c37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/components/schemas/common/Error.yaml
Line: 9:11
Comment:
`Error` schema's `details` field is missing `additionalProperties: true` while all other error schemas now have it
```suggestion
details:
type: object
description: Additional error details
additionalProperties: true
```
How can I resolve this? If you propose a fix, please make it concise. |
493e9f8 to
34de965
Compare
fbf418e to
48e70c8
Compare
34de965 to
e2eb0c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 files reviewed, 1 comment
Additional Comments (1)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 145:145
Comment:
should reference `GridError.yaml` instead of `Error.yaml` to be consistent with the PR's goal of standardizing on `GridError`
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
e2eb0c0 to
defc948
Compare
48e70c8 to
00ab46b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, 1 comment
Additional Comments (1)
The 410 response here still references Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/customers/customers_{customerId}.yaml
Line: 172:172
Comment:
Inconsistent error schema reference - uses old `Error` schema instead of `GridError`
The 410 response here still references `../common/Error.yaml` while the PR updates other webhook responses to use `GridError`. The old `Error` schema lacks `additionalProperties: true` on the `details` object.
```suggestion
$ref: ../../components/schemas/common/GridError.yaml
```
How can I resolve this? If you propose a fix, please make it concise. |
00ab46b to
fce8683
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 files reviewed, 2 comments
Additional Comments (2)
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/transfers/transfer_in.yaml
Line: 9:11
Comment:
Removed `Idempotency-Key` parameter that was just added in PR #138. This appears to be an unintended revert not mentioned in PR description.
How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix With AIThis is a comment left during a code review.
Path: openapi/paths/transfers/transfer_out.yaml
Line: 7:9
Comment:
Removed `Idempotency-Key` parameter that was just added in PR #138. This appears to be an unintended revert not mentioned in PR description.
How can I resolve this? If you propose a fix, please make it concise. |

TL;DR
Added a new
GridErrorschema and improved error handling in the OpenAPI specification.What changed?
GridErrorschema to standardize error responsesadditionalProperties: trueto all error schemadetailsobjects to allow for flexible error detailsBulkCustomerImportErrorEntryto extend fromGridErrorinstead of using a nested error structureGridErrorinstead ofError