Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/batch_api/error_wrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def body
#
# Returns: an Array with the error body represented as JSON.
def render
[status_code, RackMiddleware.content_type, [MultiJson.dump(body)]]
[status_code, RackMiddleware.content_type, [body.to_json]]
end

# Public: the status code to return for the given error.
Expand Down
2 changes: 1 addition & 1 deletion lib/batch_api/rack_middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def call(env)
begin
request = request_klass.new(env)
result = BatchApi::Processor.new(request, @app).execute!
[200, self.class.content_type, [MultiJson.dump(result)]]
[200, self.class.content_type, [result.to_json]]
rescue => err
ErrorWrapper.new(err).render
end
Expand Down