gala icon indicating copy to clipboard operation
gala copied to clipboard

Use `fetch` to require hash keys

Open soberstadt opened this issue 4 years ago • 0 comments

We ran into an issue while refactoring the code around our usage of Gala and ended up passing corrupted hashes into Gala::PaymentToken.new this resulted in exceptions, but obtuse errors like NoMethodError: undefined method 'unpack1' for nil:NilClass. This patch changes the hash digging to use fetch, which will raise KeyErrors instead, making it more clear there was corruption.

soberstadt avatar Feb 01 '22 14:02 soberstadt