mirror of
https://github.com/luxfi/api.git
synced 2026-09-24 00:24:53 +00:00
ErrorUnspecified is the zero value and carries "the call succeeded" — a reply holding it is read as a good answer and its fields are trusted. The only other codes name a closed database and a missing key, so every other failure had nowhere to go and was reported as the zero. A caller then took a zero-valued block as a real one. ErrorInternal gives those failures a word. Appending is safe in both directions: errorFromZAP's default arm turns an unknown code into an error, so a reader that predates this still sees a failure rather than a success. Co-authored-by: Hanzo Dev <[email protected]>