|
|
@ -10,6 +10,10 @@ module ControllerRescueHandler
|
|
|
|
Util.logger_error e
|
|
|
|
Util.logger_error e
|
|
|
|
render json: {status: -1, message: "接口数据异常"}
|
|
|
|
render json: {status: -1, message: "接口数据异常"}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
rescue_from NoMethodError do |e|
|
|
|
|
|
|
|
|
Util.logger_error e
|
|
|
|
|
|
|
|
render json: {status: -1, message: "接口方法异常"}
|
|
|
|
|
|
|
|
end
|
|
|
|
# rescue_from ActionView::MissingTemplate, with: :object_not_found
|
|
|
|
# rescue_from ActionView::MissingTemplate, with: :object_not_found
|
|
|
|
# rescue_from ActiveRecord::RecordNotFound, with: :object_not_found
|
|
|
|
# rescue_from ActiveRecord::RecordNotFound, with: :object_not_found
|
|
|
|
rescue_from Educoder::TipException, with: :tip_show
|
|
|
|
rescue_from Educoder::TipException, with: :tip_show
|
|
|
|