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
Return correct error message on JSON parser erroro
Oliver Güntherb1351acb0040
diff --git a/lib/api/v3/attachments/attachments_by_container_api.rb b/lib/api/v3/attachments/attachments_by_container_api.rbindex 6616b8e0b0b..78b93858b24 100644--- a/lib/api/v3/attachments/attachments_by_container_api.rb+++ b/lib/api/v3/attachments/attachments_by_container_api.rb@@ -59,7 +59,7 @@ module APIparams[:metadata] = JSON.parse(params[:metadata]) if params.key?(:metadata)endrescue JSON::ParserError- raise ::API::Errors::InvalidRequestBody.new(I18n.t('api_v3.errors.multipart_body_error'))+ raise ::API::Errors::InvalidRequestBody.new(I18n.t('api_v3.errors.invalid_json'))endend