Skip to content

Commit ad836b6

Browse files
authored
Fix README error-handling example: AgentScoreError has no .message attr (#34)
## Summary - The README's error-handling example printed `e.message`, but `AgentScoreError` exposes its text via `str(e)`, not a `.message` attribute (`hasattr(err, "message")` is `False`). - Swap `print(e.code, e.message)` → `print(e.code, str(e))` so the snippet runs as written. Docs-only; no version bump. ## Test plan - [x] `str(e)` returns the error text; `.message` is not an attribute on `AgentScoreError` - [x] pre-push hooks (ty, vulture) green
1 parent b330571 commit ad836b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ except QuotaExceededError as e:
211211
except AgentScoreTimeoutError:
212212
print("Network timeout — retry with backoff.")
213213
except AgentScoreError as e:
214-
print(e.code, e.message)
214+
print(e.code, str(e))
215215
```
216216

217217
## Quota observability

0 commit comments

Comments
 (0)