Feat/sdk error taxonomy#427
Open
aliyuHabibu wants to merge 3 commits into
Open
Conversation
=== Core error taxonomy (packages/sdk/src/errors.ts) === New ErrorCategory enum with 7 top-level categories: TRANSPORT, VALIDATION, SIMULATION, POLICY, COMPATIBILITY, EXECUTION, UNKNOWN SdkError base class with category, code, message, recoverable, details, cause, and toJSON(). Factory functions for every category: transportError, connectionTimeoutError, networkError, validationError, invalidInputError, missingFieldError, simulationError, policyError, rateLimitError, unauthorizedError, compatibilityError, unsupportedChainError, unsupportedOperationError, executionError, signingError, insufficientFundsError === SDK alignment === - AgentRequestError extends SdkError with automatic category from HTTP status - AgentClient: categorized error parsing from API responses, CategorizedError type - SignatureProviderError: each error code maps to an ErrorCategory - types/index.ts: new CategorizedError interface for API error responses - index.ts: exports new errors module === Backend alignment === - ToolResult: new errorCategory and errorCode fields - BaseTool.createErrorResult: accepts optional errorCategory and errorCode - ApplicationError: gains errorCategory (auto-derived from statusCode) and errorCode, plus toCategorizedErrorResponse() helper - ErrorHandler middleware: response includes category and recoverable fields - SorobanError: maps every SorobanErrorCode to an ErrorCategory via sorobanCodeToCategory() and getSorobanCategory() helpers Clients can now switch on error.category without parsing strings: if (err.category === 'POLICY') handleRateLimit()
|
@aliyuHabibu Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
@ALL Can you please approve my points, wave ends in hours |
Contributor
Author
|
@ALL Can you please approve my points, wave ends in few hours |
1 similar comment
Contributor
Author
|
@ALL Can you please approve my points, wave ends in few hours |
Contributor
Author
|
@ALL Conflict resolved, Please approve my points |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feat/sdk error taxonomy
Ready for review.
Closes #377