You need to sign in to do that
Don't have an account?
vlad testing
How to get error messages from REST API in English language
Hello guys!
If Salesforce language is not English, I have some problems with response from REST API.
For example, if Salesforce language is English than I get a response in English and it's good for me cause I can handle this error and fix it
But if our user uses the French language like main Salesforce`s language, then we have some problems with response
We need to have a response error message in English for success handling errors from REST API.
I try to use Accept-Language header, but it did not work for me.
I don't want to write "flexible solutions" like "if" for separated language to solve this issue.
Can you help me with it?
If Salesforce language is not English, I have some problems with response from REST API.
For example, if Salesforce language is English than I get a response in English and it's good for me cause I can handle this error and fix it
[ { "message": "test, test does not have an accessible email address.", "errorCode": "INVALID_EMAIL_ADDRESS", "fields": [ "CcAddress" ] } ]
But if our user uses the French language like main Salesforce`s language, then we have some problems with response
[ { "message": "test, test n'a pas d'adresse e-mail accessible.", "errorCode": "INVALID_EMAIL_ADDRESS", "fields": [ "CcAddress" ] } ]
We need to have a response error message in English for success handling errors from REST API.
I try to use Accept-Language header, but it did not work for me.
I don't want to write "flexible solutions" like "if" for separated language to solve this issue.
Can you help me with it?
Not sure but this might help Retrieve Knowledge Language Settings (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_knowledge_retrieve_language.htm)
Best Regards
Dushyant Srivastava
Hi Vlad -
Did you get any generic solution for this?
I am sorry, but not.
we have started hardcode all error messages in all languages.
it is so sad, I know