DEV Community

Aben
Aben

Posted on

im getting an error :"401 not authorized, no token", when I try to make a put request

hello guys,
im encounting a problem as mention above when I try to update my profile using a put request
the token is stored in the local storage and I'm sending it along in the authorization header
so when i send the request and inspect the network tab i can see that the authorization heaser is not present in the request headers, and i don't know why ,
please, could someone help me

here is my back end:
Image description

and here is the middleware I'm using:
Image description
here is the front end :

and for state management I'm using redux :

Image description

Image description

Image description

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay