server-sdk-py: log caller-side error codes below error level
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability
Research direction
Start at _log_level in the Python SDK's errors.py, the single place both the stdlib and [observability] logging paths consult, and list the codes it currently maps to WARNING versus ERROR. Mirror the existing bad_input level test in the tests beside it for each newly demoted code, and cover the auth_required case where upstream_status is set stays at ERROR. Done means caller-side codes log at WARNING, metrics via service_errors_total are untouched, tests pass, and the server-sdk/errors docs page lists the new levels.
Written by the indexing model from the issue text.
Description
Problem
nimblebrain_server_sdk.errors records every surfaced ServiceError as one service_error log line. Only bad_input is logged at WARNING; every other code is logged at ERROR.
A server that returns not_found or conflict through the contract does so in ordinary use: an agent looks up an id that does not exist, or writes to a record whose state refuses the write. Those are the caller's situation, not a server fault, yet each one is an error-level log line. A team that watches error-level logs sees noise proportional to normal traffic.
Proposal
Log the caller-side codes at WARNING: bad_input, not_found, conflict, forbidden, and auth_required when it is the caller's missing identity. Keep ERROR for internal, upstream_unavailable, upstream_timeout, upstream_rejected, quota_exhausted and rate_limited.
Open question: auth_required is used both for a caller with no identity and for an upstream that rejects the server's own credential (ServiceError.from_upstream(401)). The second is an operator's problem and should stay at ERROR. One way to tell them apart is upstream_status being set.
Scope
_log_levelinerrors.py, used by both the standard-library path and the[observability]path.- The metric is unchanged: every code still increments
service_errors_total. - Tests beside the existing
bad_inputlevel test; the docs pageserver-sdk/errorsstates the levels.
Not urgent: it changes log noise, not behaviour. Fold it into the next SDK release.
- Dominant language
- TypeScript
- Stars
- 23
- Forks
- 15
- Avg merge
- 4h 28m
- Merged PRs (30d)
- 209
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NimbleBrainInc/nimblebrain
-
area/cli good first issue needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NimbleBrainInc/nimblebrain#2063 ·
Maintainers usually reply within 1 day
-
area/cli good first issue needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
NimbleBrainInc/nimblebrain#2062 ·
Maintainers usually reply within 1 day
-
Connector-skill identity derives the org, not the server, from io.github.<org>/<server> namesMay be free again @Coding-Professional claimed this 9 days ago, and no pull request is open. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NimbleBrainInc/nimblebrain#1800 · 1 comment ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NimbleBrainInc/nimblebrain#1680 ·
Maintainers usually reply within 1 day
-
area/api needs-triage severity:4-low
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
NimbleBrainInc/nimblebrain#1649 ·
Maintainers usually reply within 1 day
All issues in NimbleBrainInc/nimblebrain
Similar issues
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Comfy-Org/ComfyUI_frontend#23773 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lingdojo/kana-dojo#34301 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/gh-aw-firewall#11797 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#7007 ·
Maintainers usually reply within 1 day