Skip to main content
Answered

Possible bug: HTTP 500 when updating an article

  • October 9, 2024
  • 1 reply
  • 42 views

We noticed one of our customer help center article was not being updated because of the following response with an HTTP code of 500.
{
    "type": "error.list",
    "request_id": "002tv9efacb52hqthea0",
    "errors": [
        {
            "code": "server_error",
            "message": "Server Error"
        }
    ]
}

 

Since the error message doesn't provide specifics, we investigated and found that the issue occurs only when an article contains a callout with more than one paragraph. Here’s the bare minimum how to reproduce the issue:

 

What works: Callout with one paragraph ✅

curl --location --request PUT 'https://api.intercom.io/articles/:id' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXX' \
--data '{
    "body": "<p class=\"no-margin\"></p>\n<div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80; border-color:#fbc91633;\">\n<p class=\"no-margin\">Hello Mars</p>\n</div>"
}'

 

What does not work: Callout with two paragraphs ❌

curl --location --request PUT 'https://api.intercom.io/articles/:id' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXX' \
--data '{
    "body": "<div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80; border-color: #bc91633;\">\n<pclass=\"no-margin\">Hello Mars</p>\n<p class=\"no-margin\">Hello World</p>\n</div>"
}'

 

The contents above are perfectly valid and was returned through the API itself. (GET /articles/:id)

Interestingly, the failed scenario works fine if you manually create an article with a two-paragraph callout through the UI.

I have also uploaded a video on YouTube demonstrating the bug:

 

 

Any guidance on how we can resolve this would be much appreciated.

Best answer by mateusz.leszkiewicz

Hi @hyder, It’s Mat from the Support Engineering Team 😀

Thank you for such thorough investigation notes. I’ve created an Intercom converiaton for our engineers to look into this in details.

Please continue this thread there.

View original
Did this topic help you find an answer to your question?

1 reply

mateusz.leszkiewicz
Intercom Team
Forum|alt.badge.img+5

Hi @hyder, It’s Mat from the Support Engineering Team 😀

Thank you for such thorough investigation notes. I’ve created an Intercom converiaton for our engineers to look into this in details.

Please continue this thread there.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings