Enhance Hero Error Handling with Custom Error Classes#1
Open
xLDVx wants to merge 4 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 Hero Error Handling with Custom Error Classes
Description
Task
Create custom error classes for hero-specific errors
Acceptance Criteria
Summary of Work
Custom Hero Error Classes Implementation
Changes Made
src/errors/hero-errors.tsError Classes Overview
HeroError: Base class for all hero-related errorsHeroNotFoundError: Specific error for missing heroesInvalidHeroDataError: Error for data validation issuesUnauthorizedHeroAccessError: Error for access control scenariosImplementation Details
Testing Approach
src/errors/hero-errors.test.tscovers error class instantiationBenefits
Potential Future Improvements
Changes Made
Tests
Signatures
Staking Key
He88p8gayqrGSWqpj7Mu4XzqcKsURDjnuK1z2UMnio3A: 3PQSgKNGffAxeQcPJP1XoDFCe3FUv5wqm5sTjGBiFiQjVo1jH4hsxuc2otErK5nbiE2pNTDwQ6icgznX3j6wYptGRHi32gyu6Yh9Jp9YmdHtdo8jsEvG6bEHuSbkxNdYMnUZdETqiLNYoViG6QiW2WhkUBJtS37b1HYpegaZp326NXqQHNfeSgZCFwSyhLcWWmgLLrJQUcYCjof1ZC3dyZrpJcVsuuAnWirUTppkXg1T5zh1sJKrhURh8kYf4gJVCzmJeh72rG9NnFQtyBrvks336Lw6CPRXYScRW2u2uVnqz65Cko1SyxJhCNLKDHVRqMNMqsEvPPPEP2T2ny3STuntiCsekw9VMUFMVwonq3mdxsXPPQDtBG2qp9aBkyTzyQVyL7AuxkxxeSg1XAzi3Cw3Cdz
Public Key
FVeknmSZKTCvd8fxFxt5T4mQgxED2QhYBZyexLyCrrB8: F9mEKhsjGDHFdZ5agYC9dds78vvCJPq2u6NAYGSr69R8PusUdJejscqBoQdsftJ5eEm6WZMF5BpV746wuuiWKcbn2M4XJcAFFodZxXCdpz9PPDSVmSYgrxQ8NNKF7jAkNPJDzoJtZ4GAhk1nKX1zqfZkuZvkGCgSay3Np6pd8zhBs6kUyGnL8nFcTj9d9nnGyszNDkLFwkko1g4jxo4EiExAk4LMkDruGGtJB4c1b5aGVhRPqsqjhrPN2efVEhAVmqpqEo6i1EzSwKqHB2TKA1QXGLLL6ubPtw1UF7mcczKV7vQX3CDR95WQu5kASg9aMYmRKT7H6Y6RbjiemesDaki8q3AFDuz7QoJY1EUYw3GNSeGCwHifyvWiLdxadAeDvb5RNcp9ectt5i4sNXkjG23ssKJ