mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 20:24:43 +08:00
17 lines
406 B
Ruby
17 lines
406 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class BaseController < ApiController
|
|
rescue_from ActionController::ParameterMissing do |e|
|
|
logger.error e.message
|
|
render jsonapi: {}, status: :bad_request
|
|
end
|
|
|
|
rescue_from ActiveRecord::RecordNotFound do |e|
|
|
logger.error e.message
|
|
render jsonapi: {}, status: :not_found
|
|
end
|
|
end
|
|
end
|
|
end
|