Skip to content

Fix unhashable exception SDKError #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jpennors
Copy link

@jpennors jpennors commented Jul 7, 2025

Hi 👋

A small PR for an issue I recently got with the SDKError exception class.

Context

To be monitored and processed, exceptions might be mapped as dictionary or set. I recently encounter the following issue using the mistral Python client and Rollbar :

TypeError("unhashable type: 'SDKError'")

This means, I got an exception using the mistral library and I'm not aware of it because the exception is not sent to Rollbar.

Bug reproduction

Just do :

error = SDKError("", 0, "")
print({error})

It will fail. Then add frozen=True like in the PR and it will work well.

Here is where an exception is mapped as a set in Rollbar : https://github.com/rollbar/pyrollbar/blob/84efba4ae3c9a5faef60b3bed3856f27940a0964/rollbar/__init__.py#L817

@GaspardBT
Copy link
Collaborator

Hey 👋
Thanks for opening this PR and the detailed reproduction, those files are auto generated and shouldn't be modified this way.
I will report this issue to our code generation partner to see how we can address this issue.

Could you open an issue with this bug report so we can keep you updated
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants