Description
campus_python.auth.v1.clients.Client.update() sends its request with PUT, but the Campus auth service only implements PATCH on /clients/{client_id}/. Every call to update() therefore fails with a server error, even when the identical request succeeds as a PATCH.
Discovered while registering redirect_uris on a client to prepare for campus#651 (redirect_uri enforcement).
Steps to Reproduce
api.auth_clients["uid-client-xxxx"].update(redirect_uris=["http://localhost:5000/finalize_login"])
against the development deployment (campusauth-development.up.railway.app), verified 2026-09-30:
- Wrapper call fails consistently (2/2 attempts) with
campus_python.errors.ServerError: An unexpected error occurred (5xx from the server).
- Raw
PATCH /auth/v1/clients/uid-client-xxxx with the identical JSON body {"redirect_uris": [...]} returns 200 and the change persists.
Expected Behavior
update() should succeed; the campus auth clients routes (campus/campus/auth/routes/clients.py) register GET/POST/PATCH/DELETE for /clients/{client_id}/ and have no PUT route.
Actual Behavior
campus_python/auth/v1/clients.py Client.update() (~line 118) calls:
resp = self.client.put(self.make_path(), json=json_data)
which 5xx-s on the current development deployment.
Suggested Fix
Change self.client.put(...) to self.client.patch(...) in Client.update().
Environment
- campus-api-python 0.3.0 (installed from
main)
- Python 3.11.9, Windows 11
Description
campus_python.auth.v1.clients.Client.update()sends its request with PUT, but the Campus auth service only implements PATCH on/clients/{client_id}/. Every call toupdate()therefore fails with a server error, even when the identical request succeeds as a PATCH.Discovered while registering
redirect_urison a client to prepare for campus#651 (redirect_uri enforcement).Steps to Reproduce
against the development deployment (
campusauth-development.up.railway.app), verified 2026-09-30:campus_python.errors.ServerError: An unexpected error occurred(5xx from the server).PATCH /auth/v1/clients/uid-client-xxxxwith the identical JSON body{"redirect_uris": [...]}returns 200 and the change persists.Expected Behavior
update()should succeed; the campus auth clients routes (campus/campus/auth/routes/clients.py) register GET/POST/PATCH/DELETE for/clients/{client_id}/and have no PUT route.Actual Behavior
campus_python/auth/v1/clients.pyClient.update()(~line 118) calls:which 5xx-s on the current development deployment.
Suggested Fix
Change
self.client.put(...)toself.client.patch(...)inClient.update().Environment
main)