• vlad testing
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    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?
 
Header Content-Type: multipart/form-data; boundary=boundary_string
Content-Disposition: form-data; name="entity_Attachment";
Content-Type: application/json

{  
    "Description" : "Marketing Q1 2011",
    "ParentId" : "00Q1700000BLt9F",
    "Name" : "Marketing Brochure Q1"
}

--boundary_string
Content-Type: application/pdf
Content-Disposition: form-data; name="Body"; filename="2011Q1MktgBrochure.pdf"

Zm9yIHRoZSByZX..........DQoNCg0KDQoNCg0KDQo

--boundary_string--

I've also tried adding Content-Transfer-Encoding: base64 just below Content-Type: application/pdf ​​​​​​, but that also isn't working.
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?