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

Bug: Unauthorized Error (401) When Creating Insight via POST /v2/workspaces/{id}/insights #3985

Closed
SURAJ-SHARMA27 opened this issue Aug 19, 2024 · 9 comments
Assignees
Labels
🐛 bug Something isn't working 👀 needs triage

Comments

@SURAJ-SHARMA27
Copy link
Contributor

Describe the bug

When a user selects repositories from the workspace and clicks "Add to Insight" followed by "Create Insight," the page freezes for an extended period. Eventually, the site crashes and throws an error:

image

I tested the endpoint using Swagger with a valid payload, and it returned a 401 Unauthorized error.

Proposed Solution:

a fallback function to handle cases where the API fails to return the desired response, preventing the site from crashing.

Steps to reproduce

  1. Go to workspace
  2. Select some repositories
  3. Click on add to insight button
  4. Click on create insight.
@SURAJ-SHARMA27 SURAJ-SHARMA27 added 🐛 bug Something isn't working 👀 needs triage labels Aug 19, 2024
Copy link
Contributor

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please comment on this issue.

For full info on how to contribute, please check out our contributors guide.

@SURAJ-SHARMA27
Copy link
Contributor Author

If this issue is valid and the organization is looking to fix it, I would like to work on it. @jpmcb @nickytonline , could you please take a look?

@jpmcb
Copy link
Member

jpmcb commented Aug 19, 2024

I'm not able to reproduce this: can you give us abit more information?

  1. Generally, geographically, where are you located?
  2. You mention that "the API fails to return the desired response": can you look in the network tab to give us which API endpoint is failing? Is it timing out?
  3. Is this consistently reproducible?

@SURAJ-SHARMA27
Copy link
Contributor Author

Yes i have attached the video for your reference:

screen-capture.28.webm

@BekahHW
Copy link
Member

BekahHW commented Aug 20, 2024

@jpmcb it seems to be an issue just on beta.

@jpmcb jpmcb self-assigned this Aug 20, 2024
@jpmcb
Copy link
Member

jpmcb commented Aug 20, 2024

I believe this is an API issue where the POST v2/workspaces/:workspace-id/insights is timing out. I believe I have a solution and this should start working on beta when we get it in.

@SURAJ-SHARMA27
Copy link
Contributor Author

SURAJ-SHARMA27 commented Aug 21, 2024

Just asking out of curiosity, is the backend of OpenSauced not open source? 🙂

@jpmcb jpmcb closed this as completed Aug 21, 2024
@jpmcb
Copy link
Member

jpmcb commented Aug 21, 2024

Just asking out of curiosity, is the backend of OpenSauced not open source?

Good question! Not currently: we closed sourced it earlier this year as we were working on some more special proprietary bits.

This has been fixed in the beta API and will land in prod soon!

@SURAJ-SHARMA27
Copy link
Contributor Author

Just asking out of curiosity, is the backend of OpenSauced not open source?

Good question! Not currently: we closed sourced it earlier this year as we were working on some more special proprietary bits.

This has been fixed in the beta API and will land in prod soon!

No problem, @jpmc. Actually, I have worked with backend development as well and was looking to learn from here by contributing. That's why I asked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 👀 needs triage
Projects
None yet
Development

No branches or pull requests

3 participants