MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / UnexpectedStatus

Class UnexpectedStatus

beanhub_cli/internal_api/errors.py:4–13  ·  view source on GitHub ↗

Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True

Source from the content-addressed store, hash-verified

2
3
4class UnexpectedStatus(Exception):
5 """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True"""
6
7 def __init__(self, status_code: int, content: bytes):
8 self.status_code = status_code
9 self.content = content
10
11 super().__init__(
12 f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}"
13 )
14
15
16__all__ = ["UnexpectedStatus"]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected