Sha256: 6db204bbe009706849d27423b180b508d6b030a7c67980eb1f1e5c4fd97058c6
Contents?: true
Size: 565 Bytes
Versions: 18
Compression:
Stored size: 565 Bytes
Contents
prepend Respond # If the request doesn't match application/json specifically, it would be passed through: respond.with_passthrough respond.with_json # The reason why this test is important is that it tests the behaviour of error handling. Normally, if a request comes into the middleware and fails due to an unhandled exception, this is passed along by Utopia::ExceptionHandler. If the client is expecting JSON, they should get a JSON error response. on 'file-not-found' do fail! 404, {message: 'File not found'} end # Accept: text/html, application/json, */*
Version data entries
18 entries across 18 versions & 1 rubygems