Commit bff4b9ec by Ivan Lan

fix: fix TalltyImportExport::Import::RecordNotFountError rescue from render

parent 0f4994e5
...@@ -3,7 +3,7 @@ module SimpleController::Importable ...@@ -3,7 +3,7 @@ module SimpleController::Importable
class << self class << self
def included base def included base
base.rescue_from TalltyImportExport::Import::RecordNotFountError do |e| base.rescue_from TalltyImportExport::Import::RecordNotFountError do |e|
render json: { error: e.message }, status: 422 render json: { message: e.message, code: -1 }, status: 422
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment