1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

openlab_projects ctrl, rescue all standard error

This commit is contained in:
Nicolas Florentin 2016-04-25 10:07:54 +02:00
parent 5403386c75
commit 4cfcbb47aa

View File

@ -4,7 +4,7 @@ class API::OpenlabProjectsController < API::ApiController
def index
begin
render json: PROJECTS.search(params[:q], page: params[:page], per_page: params[:per_page]).response.body
rescue Errno::ECONNREFUSED
rescue StandardError
render json: { errors: ['service unavailable'] }
end
end