Rack Middleware for gracefully handling exceptions in JSON APIs.