错误信息打印到日志
This commit is contained in:
parent
ce611bc725
commit
5241dddca2
|
@ -7,7 +7,7 @@ module Mobile
|
|||
@app.call(@env)
|
||||
rescue =>e
|
||||
message = {status: 1, message: e.message }.to_json
|
||||
puts(e.backtrace.join("\n")) if Rails.env.development?
|
||||
Rails.logger.error e
|
||||
status = 200
|
||||
headers = { 'Content-Type' => content_type }
|
||||
Rack::Response.new([message], status, headers).finish
|
||||
|
|
Loading…
Reference in New Issue