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

get_user_info() endpoint broken #1059

Closed
richrines1 opened this issue Sep 10, 2024 · 0 comments · Fixed by #1079
Closed

get_user_info() endpoint broken #1059

richrines1 opened this issue Sep 10, 2024 · 0 comments · Fixed by #1079
Assignees
Labels
bug Something isn't working general-superstaq

Comments

@richrines1
Copy link
Contributor

richrines1 commented Sep 10, 2024

What is happening?

two bugs breaking _SuperstaqClient.get_user_info():

  1. it points to the wrong url (the endpoint should be "/user_info" and not "/get_user_info"
  2. even after fixing the above, it always raises an exception due to a malformed request

How can we reproduce the issue?

service = css.Service()
_ = service._client.get_user_info()

raises

SuperstaqServerException: <!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 400 (Bad Request)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>400.</b> <ins>That’s an error.</ins>
  <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
 (Status code: 400, non-retriable error making request to Superstaq API)

If you would like to contact a member of our team, email us at superstaq@infleqtion.com or join our Slack workspace: https://join.slack.com/t/superstaq/shared_invite/zt-1wr6eok5j-fMwB7dPEWGG~5S474xGhxw.

the same error occurs before and after correcting the url as described above. However the behavior is different when running against a local server

What should happen?

(it should work)

Environment

  • Superstaq version: 0.5.31
  • client-superstaq version: 0.5.26
  • Operating system: Ubuntu
  • Python version: 3.12

Any additional context?

No response

@richrines1 richrines1 added the bug Something isn't working label Sep 10, 2024
@cdbf1 cdbf1 self-assigned this Sep 24, 2024
@cdbf1 cdbf1 mentioned this issue Oct 1, 2024
@cdbf1 cdbf1 closed this as completed Oct 2, 2024
cdbf1 added a commit that referenced this issue Oct 2, 2024
Hopefully fixes
#1059

I think issue was that something on the server side wasn't happy with
using json body for get requests. This PR switches to including get
request query in the URL string.

Also updates the route to the correct `/user_info`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working general-superstaq
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants