representable icon indicating copy to clipboard operation
representable copied to clipboard

Teach #from_hash to raise TypeError when argument is not a Hash

Open myabc opened this issue 9 years ago • 0 comments

@apotonick An alternative would be for #from_hash to fail silently (i.e. data = {} unless ::Hash === data). However, I think raising a TypeError makes more sense in a web application context. it allows the Operation or web framework Controller to rescue TypeError and return a 400 to the client.

myabc avatar Nov 16 '16 19:11 myabc