-
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
base: 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split
Are you sure you want to change the base?
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile OverviewGreptile SummaryIntroduced a new Key Changes:
Impact: Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/common/GridError.yaml | Created new GridError schema with additionalProperties on details object |
| openapi/components/schemas/customers/BulkCustomerImportErrorEntry.yaml | Created new schema extending GridError with correlationId field |
| openapi/components/schemas/customers/BulkCustomerImportJob.yaml | Refactored errors array to use BulkCustomerImportErrorEntry instead of inline schema |
| openapi/components/schemas/errors/Error400.yaml | Added additionalProperties: true to details object |
| openapi/components/schemas/webhooks/IncomingPaymentWebhookForbiddenResponse.yaml | Updated to reference GridError instead of Error |
| openapi/components/schemas/webhooks/IncomingPaymentWebhookUnprocessableResponse.yaml | Updated to reference GridError instead of Error |
Sequence Diagram
sequenceDiagram
participant Client
participant API as Grid API
participant Schema as Error Schema
Note over Client,Schema: Error Response Flow
Client->>API: API Request (invalid input)
API->>Schema: Validate against Error400 schema
Schema->>Schema: code, message, status (required)
Schema->>Schema: details (additionalProperties: true)
API->>Client: Return Error400 response
Note over Client,Schema: Bulk Import Error Flow
Client->>API: POST /bulk-import
API->>API: Process import entries
API->>Schema: Create BulkCustomerImportErrorEntry
Schema->>Schema: Extend GridError (code, message, details)
Schema->>Schema: Add correlationId (required)
API->>Client: Return errors array with BulkCustomerImportErrorEntry[]
Note over Client,Schema: Webhook Error Flow
Client->>API: Webhook callback
API->>Schema: Validate and prepare webhook response
Schema->>Schema: Use GridError base schema
Schema->>Schema: Add webhook-specific fields (reason, requiredFields)
API->>Client: Return IncomingPaymentWebhook*Response

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