Skip to content

Conversation

@csmuc
Copy link

@csmuc csmuc commented Jul 31, 2017

  • codes added to errors as symbols
  • can be mapped with i18n by clients

The codes are "taken" or "invalid" and can be mapped to different languages with Rails i18n.

- added to errors as symbols
- can be mapped with i18n by clients
@csmuc csmuc force-pushed the support_validation_error_codes branch from 6cc2cec to 0142f56 Compare July 31, 2017 11:42
@golcor
Copy link

golcor commented Sep 4, 2017

👍
any feedback? this would be quite useful for our project

@senid231
Copy link
Member

Hi @csmuc
according to changes in PR #277 you can now just override #error_key and #error_msg for JsonApiClient::ErrorCollector::Error at lib/json_api_client/error_collector.rb:43

I think we should not change current behavior of using title || detail as error message because it may break existing functionality.
The better way would be to allow overriding it easily for application specific purposes

@senid231
Copy link
Member

@golcor can you say if overriding of #error_key and #error_msg in JsonApiClient::ErrorCollector::Error provide all that you need for your project, or maybe something is missing?

@senid231 senid231 closed this Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants