OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
adapt content type on errors definition
ulferts50b1ac7a3dac
diff --git a/lib/api/root.rb b/lib/api/root.rbindex 66f5067b387..fe64cde5e91 100644--- a/lib/api/root.rb+++ b/lib/api/root.rb@@ -35,7 +35,7 @@ module APIparser :json, API::V3::Parser.new- error_representer ::API::V3::Errors::ErrorRepresenter, "hal+json"+ error_representer ::API::V3::Errors::ErrorRepresenter, "application/hal+json; charset=utf-8"authentication_scope OpenProject::Authentication::Scope::API_V3OpenProject::Authentication.handle_failure(scope: API_V3) do |warden, _opts|diff --git a/lib/api/utilities/grape_helper.rb b/lib/api/utilities/grape_helper.rbindex e2c37f8e7cb..270e6227eb3 100644--- a/lib/api/utilities/grape_helper.rb+++ b/lib/api/utilities/grape_helper.rb@@ -71,7 +71,7 @@ module APIoriginal_exception = $!representer = error_representer.new eresp_headers = instance_exec &headers- env["api.format"] = error_content_type+ resp_headers["Content-Type"] = error_content_typeif log == trueOpenProject.logger.error original_exception, reference: :APIv3diff --git a/modules/bim/app/controllers/bim/bcf/api/root.rb b/modules/bim/app/controllers/bim/bcf/api/root.rbindex aac9d5a7f13..3fdcadc37d9 100644--- a/modules/bim/app/controllers/bim/bcf/api/root.rb+++ b/modules/bim/app/controllers/bim/bcf/api/root.rb@@ -38,7 +38,7 @@ module Bim::Bcfdefault_format :json- error_representer ::Bim::Bcf::API::V2_1::Errors::ErrorRepresenter, :json+ error_representer ::Bim::Bcf::API::V2_1::Errors::ErrorRepresenter, "application/json; charset=utf-8"error_formatter :json, ::Bim::Bcf::API::ErrorFormatter::Jsonauthentication_scope OpenProject::Authentication::Scope::BCF_V2_1