System.ArgumentNullException: Value cannot be null. (Parameter 'user') #17701
Labels
affected/v13
area/backend
state/reproduced
state/sprint-candidate
We're trying to get this in a sprint at HQ in the next few weeks
type/bug
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
10.8.7
Bug summary
If you are not logged in in umbraco backoffice and trying to get resource by url: "domain.com/umbraco/backoffice/umbracoapi/content/GetById?id=1451", you will get System.ArgumentNullException: Value cannot be null. (Parameter 'user').
I think there is something wrong with this code, look at signature.
IUser
is nullable and at the same time there is a null check.I think there is should be non nullable
IUser
or logic with nullableIUser
.Specifics
No response
Steps to reproduce
your content id
"Expected result / actual result
Expected result: there is no error "System.ArgumentNullException: Value cannot be null. (Parameter 'user')" in logs. Maybe more suitable is to handle this case with 404 or 401 status code response and there is should be consistent signature for CheckPermissions method.
Actual result: there is "System.ArgumentNullException: Value cannot be null. (Parameter 'user')" error in logs
This item has been added to our backlog AB#46947
The text was updated successfully, but these errors were encountered: