-
Notifications
You must be signed in to change notification settings - Fork 179
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
fix(api): properly handle non-labware jsons in sim #17198
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Exception hierarchy for error codes.""" | ||
|
||
from typing import Dict, Any, Optional, List, Iterator, Union, Sequence, overload | ||
from logging import getLogger | ||
from traceback import format_exception_only, format_tb | ||
|
@@ -1099,7 +1100,7 @@ def __init__( | |
self, | ||
message: Optional[str] = None, | ||
detail: Optional[Dict[str, str]] = None, | ||
wrapping: Optional[Sequence[EnumeratedError]] = None, | ||
wrapping: Optional[Sequence[Union[EnumeratedError, BaseException]]] = None, | ||
Comment on lines
-1102
to
+1103
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not for this PR, but I think we're losing the plot on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it has always included those actually, we've just been uneven about propagating the type signature down to things that inherit from the general exception. and while it does do basically the same thing as cause and context, it also represents a specific point at which we leave native exception land and transition into ours. |
||
) -> None: | ||
"""Build an InvalidProtocolData.""" | ||
super().__init__(ErrorCodes.INVALID_PROTOCOL_DATA, message, detail, wrapping) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better, thank you.