• Jagrati Lalwani 6
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 1
    Replies
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
[
    {
        "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?
 
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
[
    {
        "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?