unauthorized
HTTP 401 · code unauthorized
The request has no valid credentials.
When Photon sends it
Section titled “When Photon sends it”Sent by your authentication middleware or handlers through photonerr.Unauthorized(msg). Photon itself never authenticates.
What the client should do
Section titled “What the client should do”Send valid credentials (for example an Authorization header) and retry.
Example response
Section titled “Example response”{ "type": "https://photon.agenticmarket.dev/errors/unauthorized", "title": "unauthorized", "status": 401, "code": "unauthorized"}Match on the code field rather than on title, which is meant for people and may change. See all error codes.