lib/jsonatra.rb in jsonatra-1.0.5 vs lib/jsonatra.rb in jsonatra-1.0.7

- old
+ new

@@ -88,11 +88,12 @@ end error do response.error = { type: :unexpected, - message: 'An unexpected error has occured, please try your request again later' + message: 'An unexpected error has occured, please try your request again later', + code: 500 } end # sinatra installs special handlers during development # this runs the "real" `not_found` block instead @@ -102,10 +103,11 @@ # set error values for JSON 404 response body # not_found do response.error = { type: :not_found, - message: "The requested path was not found: #{request.path}" + message: "The requested path was not found: #{request.path}", + code: 404 } end end