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

fix(designer): Prevent propagation of 401 Unauthorized status from Azure DevOps #14378

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

framitdavid
Copy link
Collaborator

@framitdavid framitdavid commented Jan 8, 2025

Description

This PR adds the AzureDevOpsTokenDelegatingHandler to prevent the propagation of a 401 Unauthorized status from Azure DevOps. Instead, a 500 Internal Server Error is returned to ensure that 401 errors do not leak into the application, which cause our fronted to logout our users.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. quality/testing Tests that are missing, needs to be created or could be improved. backend labels Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.57%. Comparing base (7b805ee) to head (e649d6b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14378   +/-   ##
=======================================
  Coverage   95.57%   95.57%           
=======================================
  Files        1865     1865           
  Lines       24152    24152           
  Branches     2783     2783           
=======================================
  Hits        23083    23083           
  Misses        812      812           
  Partials      257      257           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@framitdavid framitdavid marked this pull request as draft January 8, 2025 13:10
@framitdavid framitdavid marked this pull request as ready for review January 8, 2025 14:13
@framitdavid framitdavid linked an issue Jan 8, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error handling for expired tokens
1 participant