blob: 09a7f1665679a241eb1d9f579ff33a44db5575c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
class API::ErrorsController < Api::Controller
include Gaffe::Errors
skip_before_action :authenticate!
layout false
def show
output = { error: @rescue_response }
output.merge! exception: @exception.inspect, backtrace: @exception.backtrace.first(10) if Rails.env.development? || Rails.env.test?
render json: output, status: @status_code
end
end
|