You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should organize all error messages and properly document them, so there is a consistent, helpful and descriptive set of error messages across the sdk instead of ones I experienced like "too small" with no value or details flagged.
FRAGMENT_NOT_FOUND due to the getFunction throwing a FUNCTION_NOT_FOUND
INSUFFICIENT_BALANCE - no found in code anywhere apart from docs
INVALID_URL - not used anywhere other than doc examples and tests
LATEST_BLOCK_UNAVAILABLE - unused
UNEXPECTED_HEX_VALUE - used in hexlifyWithPrefix, which could be simplified (see below). knownHex flag seems redudant only ever true, with these only two instances.
Decoding and encoding error handling has room for improvement, would be good to get peoples thoughts on handling these errors.
Consolidate INVALID_PASSWORD and INVALID_CREDENTIALS
MemoryCache doesn't allow a value of 0 for the TTL and will throw INVALID_TTL.
I believe 0 should be allowed, as this implies the cache should be skipped.
We have two means of retrieving error codes for an error ErrorCode. and FuelError.CODES., I believe it should be one or the other, what do other people think?
Origin story
We should organize all error messages and properly document them, so there is a consistent, helpful and descriptive set of error messages across the sdk instead of ones I experienced like "too small" with no value or details flagged.
Note
Requirements
FuelError
with TypeDocError
toFuelError
#2001findOrThrow
method.chore: helper functions for common JsonAbi features #2000
Redundant error codes
PR: #2002
FRAGMENT_NOT_FOUND
due to thegetFunction
throwing aFUNCTION_NOT_FOUND
INSUFFICIENT_BALANCE
- no found in code anywhere apart from docsINVALID_URL
- not used anywhere other than doc examples and testsLATEST_BLOCK_UNAVAILABLE
- unusedUNEXPECTED_HEX_VALUE
- used inhexlifyWithPrefix
, which could be simplified (see below).knownHex
flag seems redudant only ever true, with these only two instances.Discussion worthy
INVALID_PASSWORD
andINVALID_CREDENTIALS
MemoryCache
doesn't allow a value of 0 for the TTL and will throw INVALID_TTL.I believe 0 should be allowed, as this implies the cache should be skipped.
ErrorCode.
andFuelError.CODES.
, I believe it should be one or the other, what do other people think?Related
Reported in Error for decode erros in contract #1782
Fixed by Supply better error messaging on Reverts #823.
The text was updated successfully, but these errors were encountered: