Bug fix: reject malformed inspect URLs cleanly
Real-world URLs from a buggy upstream source arrive truncated mid-keychain with an odd number of hex characters. The library now rejects them with one consistent MalformedInspectLinkException (or equivalent per language) before the binary decode step is even attempted.
What was wrong
- PHP:
hex2bin()emitted anE_WARNINGthat Symfony escalated toErrorException(log noise even though the lib already returnedfalse). - JS/TS:
Buffer.from(oddHex, 'hex')silently truncated odd input — downstream proto parse failed with a cryptic native error or succeeded on garbage. - Python/Go/Rust/C#/Kotlin: threw, but with implementation-specific error types leaking through.
What changed
- Pre-validate hex parity, length, and character set before any binary decode.
- Wrap proto-decode failures so callers always get the same exception type for "this URL is bad".
- New exception type extends the previous parent class for backwards compatibility.
- 9 real-world malformed URLs added as negative test fixtures + synthetic odd-length / empty / non-hex cases.