Skip to content

Conversation

1yam
Copy link
Member

@1yam 1yam commented Sep 17, 2025

This PR allow to get the reason why the message is on removing state using get_message_error
exemple:

error_info = await client.get_message_error('962671d4c2ceda8bda109d6027345faa73947ba2aa375f533cd191cf10160665')


print(error_info["reason"])

@github-actions github-actions bot added the BLACK This PR has critical implications and must be reviewed by a senior engineer. label Sep 17, 2025
Copy link

"summary": "The PR introduces changes that could potentially introduce bugs or require deep understanding of the project architecture. The diff includes modifications to existing logic, addition of new features, and handling of specific statuses ('rejected' and 'removing'). The new functionality in http.py and conftest.py introduces additional checks for message status, which could affect the behavior of the application, especially in edge cases. The addition of a new fixture removing_message.json and corresponding tests in test_pricing.py and test_asynchronous_get.py indicates a deeper integration and understanding of the codebase. The changes are extensive and could affect multiple parts of the system, warranting a deeper review by experienced developers.",
"highlights": [
{
"file": "src/aleph/sdk/client/http.py",
"changes": [
{
"line": 465,
"description": "Added handling for 'removing' status in get_message_error function"
}
]
},
{
"file": "tests/unit/conftest.py",
"changes": [
{
"line": 68,
"description": "Added new fixture for 'removing_message'"
}
]
},
{
"file": "tests/unit/services/test_pricing.py",
"changes": [
{
"line": 68,
"description": "Removed assert statement checking for 'storage' price"
}
]
},
{
"file": "tests/unit/test_asynchronous_get.py",
"changes": [
{
"line": 86,
"description": "Renamed test_get_message_error to test_get_message_error_rejected"
},
{
"line": 94,
"description": "Added new test for handling 'removing' status in get_message_error"
}
]
}
]
}

@1yam 1yam changed the title Feature: new message states handle Fix: handle removing statues on get_message_error Sep 17, 2025
@1yam 1yam requested a review from nesitor September 18, 2025 10:13
@nesitor
Copy link
Member

nesitor commented Sep 18, 2025

At the moment the removing status is not an error, so we don't need to handle it as gives error. If someone wants to get the reason why is on the status, can check the reason field inside the message.

@nesitor nesitor closed this Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLACK This PR has critical implications and must be reviewed by a senior engineer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants