Internal Server Error when using Get Conversation History Messages API endpoint #6200

Closed
opened 2026-02-21 18:14:31 -05:00 by yindo · 6 comments
Owner

Originally created by @nfaganelly on GitHub (Oct 21, 2024).

Originally assigned to: @laipz8200, @crazywoola on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

v0.10.0

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. Use the following cURL command to retrieve messages from the Dify API:
    curl --location 'https://api.dify.ai/v1/messages?user=5522XXXXX279&conversation_id=bb0a4XXXXXXX-4149-8ef0-6204eed28ef7&limit=30' \
    --header 'Authorization: Bearer app-oEXXXXXXXXXXnGp' 
    
  2. Observe the response from the API.

✔️ Expected Behavior

The API should return the list of messages for the specified user and conversation ID.

Actual Behavior

The API returns the following error message:

{
    "message": "Internal Server Error",
    "code": "unknown"
}
Originally created by @nfaganelly on GitHub (Oct 21, 2024). Originally assigned to: @laipz8200, @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version v0.10.0 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. Use the following cURL command to retrieve messages from the Dify API: ```bash curl --location 'https://api.dify.ai/v1/messages?user=5522XXXXX279&conversation_id=bb0a4XXXXXXX-4149-8ef0-6204eed28ef7&limit=30' \ --header 'Authorization: Bearer app-oEXXXXXXXXXXnGp' ``` 2. Observe the response from the API. ### ✔️ Expected Behavior The API should return the list of messages for the specified user and conversation ID. ### ❌ Actual Behavior The API returns the following error message: ```json { "message": "Internal Server Error", "code": "unknown" } ```
yindo added the 🐞 bug label 2026-02-21 18:14:31 -05:00
yindo closed this issue 2026-02-21 18:14:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 21, 2024):

I found a similar closed issue regarding an "Internal Server Error" with the Dify API. The issue suggested that server errors might occur due to a full database, which has since been upgraded. It was also recommended to try replacing the API Key in the Bearer token and attempt the request again [1].

Additionally, the Dify API can experience rate limiting or throttling, which might result in an "Internal Server Error". If you encounter a rate limit, you might see an error message indicating that the server is overloaded or an error in the application has occurred [2].

You might want to check if the API key is correct and ensure that you are not hitting any rate limits. If the issue persists, consider retrying the request after some time.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 21, 2024): <!-- Answer --> I found a similar closed issue regarding an "Internal Server Error" with the Dify API. The issue suggested that server errors might occur due to a full database, which has since been upgraded. It was also recommended to try replacing the API Key in the Bearer token and attempt the request again <sup>[[1]](https://github.com/langgenius/dify/issues/526)</sup>. Additionally, the Dify API can experience rate limiting or throttling, which might result in an "Internal Server Error". If you encounter a rate limit, you might see an error message indicating that the server is overloaded or an error in the application has occurred <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/learn-more/faq/llms-use-faq.md)</sup>. You might want to check if the API key is correct and ensure that you are not hitting any rate limits. If the issue persists, consider retrying the request after some time. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@nfaganelly commented on GitHub (Oct 21, 2024):

The first error was more than 12 hours ago, I have already changed the token and I still have the same error.

@nfaganelly commented on GitHub (Oct 21, 2024): The first error was more than 12 hours ago, I have already changed the token and I still have the same error.
Author
Owner

@crazywoola commented on GitHub (Oct 21, 2024):

Please provide the container logs as well or other information. Like the time you make the request, we need to check the logs.

@crazywoola commented on GitHub (Oct 21, 2024): Please provide the container logs as well or other information. Like the time you make the request, we need to check the logs.
Author
Owner

@nfaganelly commented on GitHub (Oct 22, 2024):

The log is not reaching the agent. How do I pull the logs of requests to the Cloud that were not processed?

@nfaganelly commented on GitHub (Oct 22, 2024): The log is not reaching the agent. How do I pull the logs of requests to the Cloud that were not processed?
Author
Owner

@crazywoola commented on GitHub (Oct 22, 2024):

Can you provide the time range you sent this request?

@crazywoola commented on GitHub (Oct 22, 2024): Can you provide the time range you sent this request?
Author
Owner

@leochen-g commented on GitHub (Oct 22, 2024):

While using the Sass service, I encountered the same issue when calling this API. It's not related to a private deployment.
image

@crazywoola

@leochen-g commented on GitHub (Oct 22, 2024): While using the Sass service, I encountered the same issue when calling this API. It's not related to a private deployment. <img width="583" alt="image" src="https://github.com/user-attachments/assets/da5f910e-8e2f-46d9-8eab-9248f864027f"> @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6200