alexandrialibrary / Alexandria

Alexandria is a simple little card catalogue webapp with a terribly pretentious name.
MIT License
2 stars 1 forks source link

"It can handle any ISBN you throw at it" is a lie #42

Closed redbassett closed 9 years ago

redbassett commented 9 years ago

1484206363

hawkw commented 9 years ago

oh my god

hawkw commented 9 years ago

This one is Not My Fault, the error is because the OpenLibrary API request for this ISBN is returning {}. See https://openlibrary.org/api/books?bibkeys=ISBN:1484206363&format=json&jscmd=data.

We should probably make a better error response, though. But this book appears to be the Null Book.

hawkw commented 9 years ago

(with that said there should be validation of OpenLibrary response JSON wads but whatever, I like closing issues)

hawkw commented 9 years ago

As of a2cf652 Book.fromJson() is now in the Try[T] monad, so if we get an unparseable response object back from OpenLibrary, we should return an HTTP error code with a useable error message rather than attempting to serialise an entire Scalate error page as JSON.