Enhance Markets Endpoint Error Handling Middleware#4
Open
HermanKoii wants to merge 6 commits into
Open
Conversation
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.
Enhance Markets Endpoint Error Handling Middleware
Description
Task
Create error handling middleware for markets endpoint
Acceptance Criteria
Summary of Work
Error Handling Middleware Implementation
Changes Made
Implementation Details
Custom Error Classes:
MarketError: Base error class for market-related errorsInvalidParameterError: Handles invalid input parameters (400 status)ResourceNotFoundError: Manages scenarios where requested resources are not found (404 status)RateLimitError: Handles rate limiting scenarios (429 status)Error Handling Middleware:
Error Response Structure:
{ "error": true, "type": "ErrorType", "message": "Detailed error description", "timestamp": "ISO_TIMESTAMP" }Testing Approach
Important Notes
Potential Future Improvements
Changes Made
Tests
Signatures
Staking Key
3JF13GJW2UeYuTTRJQBdBD9bHP6Zj1QLMyXBMoAP2r5Y: Tk9b3uMhpP8ii7erVe9erCTwWF7pj4u9DNz9Qoh9mPPb4X22RDTTMreQCugQR9qahtBBUrZ1wRuC6FCUHtnAeLVjja7fJ6GA5ibEkPVDcn6nizTbNoWCwSUKCyQTFCwLyqYroGG3bmM7JvXCjUEqnitr859QDevqb57oVQxmPWmuqwVbsKkeAwAEwxBLftdkcAftZT234ZDiwLm67YBbbyWA4Tcco3L9vc6Wip8uS2ZJfGyJYXaqDSf86MCnEkiTLMWXMcacfwqKjikmHYmZyGYmRK7gGWJopJc16SDirUJfL1aSE5Sx22cjEh5JYupY5qyJCciRNxdYBLBvQ9WrVhHrEh7Ppj65FKbrhFrYWVfnZuWsdonURiCzid7v8Gpsz663qXhegV7aYqLfacgxAb6z3qbZDgm8jn
Public Key
H2j8Cz7zKCeuDTs73vtjDtBmtytQX1JyaQqvYwwQWE6p: Nb3io5KujNLnSemq9BD1T8bVP9CEUmEuiSySaf9Bo1BPaDnA75K674SCYoztor5yY5iYL5bUkGaPYkFUQb6kATnqLRCApWgvWYfVy2TPYSTHcz7CmkzxvzfSqrkmRCwoNE8mgLghpDUDMxraB6p2gcJbAfByFDxK9fe7cDN8ZMt8Mqc7m12Xsm3yigomnYF8nhTAH98z9vCK3121ae8FgMRNGhAXcnw5wQqJqpHJuDT1ss4nWWYctjdCsfiQ7JBkKnESE17gFa3zcdL7b7vzv5P34GhyjD322mpuDyjRy4gG6yHYPpHwkkBZXgAKamLdB9HUvUSugf67JMgFiGCQAbnvvXxbjpkN5zkrzY9LRwZesQXdVGx7ZXpYkpY5aL6VrKM7A1pMdPvQaXpkq2GNTpxHrWYsDSMERA