app/controllers/digital_assets_controller.rb in daengine-0.6.2 vs app/controllers/digital_assets_controller.rb in daengine-0.6.3

- old
+ new

@@ -2,10 +2,13 @@ include DigitalAssetsHelper respond_to :json skip_filter(*_process_action_callbacks.map(&:filter)) - CACHE_LAST_PARSE_TIME = 'last_parse_time' + rescue_from 'Mongoid::Errors::DocumentNotFound' do |exception| + render json: {errors: [exception.message]}, status: 404 + end + # GET /digital_assets # GET /digital_assets.json #/digital_assets/search/sami_code=92023 #/digital_assets/search/sami_code=NE00192&title=Fund%20Prospectus&fund_code=20293 def index