-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Labels
Description
Steps to reproduce
$ curl -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" --request POST --data '{"username": "nonexistent", "global_role": "user"}' http://localhost:3000/api/users/updateActual behaviour
Internal Server Error
Expected behaviour
{"detail":[{"msg":"Resource not found","code":"resource_not_exists"}]}dstack version
master
Server logs
File "/dstack/src/dstack/_internal/server/routers/users.py", line 87, in update_user
res = await users.update_user(
File "/dstack/src/dstack/_internal/server/services/users.py", line 144, in update_user
return await get_user_model_by_name_or_error(session=session, username=username)
File "/dstack/src/dstack/_internal/server/services/users.py", line 255, in get_user_model_by_name_or_error
return get_or_error(
File "/dstack/src/dstack/_internal/utils/common.py", line 270, in get_or_error
raise ValueError("Optional value is None")
ValueError: Optional value is NoneAdditional information
No response