diff --git a/lib/jsonapi/exceptions.rb b/lib/jsonapi/exceptions.rb index 2d220e756..9d663c043 100644 --- a/lib/jsonapi/exceptions.rb +++ b/lib/jsonapi/exceptions.rb @@ -244,7 +244,7 @@ def errors title: I18n.translate('jsonapi-resources.exceptions.type_mismatch.title', default: 'Type Mismatch'), detail: I18n.translate('jsonapi-resources.exceptions.type_mismatch.detail', - default: "#{type} is not a valid type for this operation.", type: type))] + default: "#{type} is not a valid type for this operation. Consider checking the spelling or pluralization of the type field.", type: type))] end end @@ -261,7 +261,7 @@ def errors title: I18n.translate('jsonapi-resources.exceptions.invalid_field.title', default: 'Invalid field'), detail: I18n.translate('jsonapi-resources.exceptions.invalid_field.detail', - default: "#{field} is not a valid field for #{type}.", + default: "#{field} is not a valid field for #{type}. Consider checking the spelling of the field name.", field: field, type: type))] end end diff --git a/locales/en.yml b/locales/en.yml index 7a03182a6..4394597b1 100644 --- a/locales/en.yml +++ b/locales/en.yml @@ -45,10 +45,10 @@ en: detail: 'Data is not a valid Links Object.' type_mismatch: title: 'Type Mismatch' - detail: "%{type} is not a valid type for this operation." + detail: "%{type} is not a valid type for this operation. Consider checking the spelling or pluralization of the type field." invalid_field: title: 'Invalid field' - detail: "%{field} is not a valid field for %{type}." + detail: "%{field} is not a valid field for %{type}. Consider checking the spelling of the field name." invalid_include: title: 'Invalid field' detail: "%{relationship} is not a valid relationship of %{resource}"