Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have added some code to make it easier to debug when the back-end throws an error #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions lib/grid_rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def r.valid?
grid_rest_log method, rest_url, rparams, "connection refused response"
rescue => e
r = Error.new e, :url => rest_url, :method => method
grid_rest_log method, rest_url, rparams, "error in request"
grid_rest_log method, rest_url, rparams, "error in request: " + r.to_s
end
r
end
Expand Down Expand Up @@ -304,9 +304,12 @@ def initialize(e, rparams)
def code
@code || 500
end

# Return the content of the request, so you can use it for debugging.
def to_s
''
@response.to_s
end

alias to_str to_s

def valid?
Expand Down