From 1c22d3a62a5c5277377453c6df4cd3ccc4a05301 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 2 Feb 2021 11:28:31 +0100 Subject: [PATCH] keep backward compatible openapi errors --- app/controllers/open_api/v1/base_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/open_api/v1/base_controller.rb b/app/controllers/open_api/v1/base_controller.rb index 20f3b5fc7..45cce71f8 100644 --- a/app/controllers/open_api/v1/base_controller.rb +++ b/app/controllers/open_api/v1/base_controller.rb @@ -20,15 +20,15 @@ class OpenAPI::V1::BaseController < ActionController::Base protected def not_found(exception) - render json: { errors: exception }, status: :not_found + render json: { errors: ['Not found', exception] }, status: :not_found end def bad_request(exception) - render json: { errors: exception }, status: :bad_request + render json: { errors: ['Bad request', exception] }, status: :bad_request end def server_error(exception) - render json: { error: exception }, status: :internal_server_error + render json: { error: ['Server error', exception] }, status: :internal_server_error end def authenticate