Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RESOLVED] [Bug]: 500 No authorization token was found during PUT requests #788

Closed
concise-studio opened this issue Nov 4, 2021 · 2 comments
Assignees
Labels

Comments

@concise-studio
Copy link

concise-studio commented Nov 4, 2021

Relevant scope

Deployed demo

Description

Currently if you try to do a PUT requests, API will answer you "No authorization token was found" with code 500.

At first, the authorization header in token is specified (see screenshot: https://ibb.co/x36vs2z)
At second, even if token not specified, I expect form API one of those errors:

  • 400 Bad Request (if we consider missing Authorization as malformed request)
  • 401 Unauthorized (if we do not care of token was not specified or not but sure that system cannot authorize user)

Can you, please, check the API and clarify what is wrong in my request and UI get this error.

Request params:
method: PUT
url: https://conduit.productionready.io/api/user
headers: Authorization: Token {token}
body: {"user":{"image":"https:\/\/realworld-temp-api.herokuapp.com\/images\/smiley-cyrus.jpeg","username":"Ya","bio":"ds","email":"kr1vetko@mail.ru"}}

@geromegrignon
Copy link
Contributor

Hey @concise-studio,

Thanks for pointing out this bug! I can reproduce it.
It's due to server redirection: the new API is hosted on https://api.realworld.io but there is a redirection to it from https://conduit.productionready.io to support existing implementations.

I don't have direct access to https://conduit.productionready.io, so I can't guarantee when I'll fix it.
I encourage you to use https://api.realworld.io/api (being used under the hood). I'll open an issue to update the documentation accordingly.

Please change the URL of the image to https://conduit.productionready.io/images\smiley-cyrus.jpeg as https://realworld-temp-api.herokuapp.com has been shut down a few days ago.
I'll open another issue to fix such a link in the new API as well.

@concise-studio
Copy link
Author

Thank you, I switched the API Url and it works now

@concise-studio concise-studio changed the title [Bug]: 500 No authorization token was found during PUT requests [RESOLVED] [Bug]: 500 No authorization token was found during PUT requests Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants