Skip to content

Add error logging for a missing Authorization header during the minim…#1420

Merged
waldekmastykarz merged 6 commits into
dotnet:mainfrom
bartizan:1419_not-found-auth-header-error
Oct 17, 2025
Merged

Add error logging for a missing Authorization header during the minim…#1420
waldekmastykarz merged 6 commits into
dotnet:mainfrom
bartizan:1419_not-found-auth-header-error

Conversation

@bartizan

Copy link
Copy Markdown
Contributor

…al permission check #1419

@bartizan bartizan marked this pull request as ready for review October 10, 2025 11:08
@bartizan bartizan requested a review from a team as a code owner October 10, 2025 11:08
@waldekmastykarz

Copy link
Copy Markdown
Collaborator

Thanks for the PR! We'll review it asap

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds error logging for missing Authorization headers during minimal permission checks to improve debugging and user feedback. The change prevents potential runtime exceptions that could occur when the Authorization header is absent.

  • Replaced direct header access with safe null-checking using FirstOrDefault()
  • Added explicit error logging when no Authorization header is found
  • Maintained existing functionality while improving error handling

Comment thread DevProxy.Plugins/Extensions/OpenApiDocumentExtensions.cs
waldekmastykarz and others added 2 commits October 17, 2025 11:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@waldekmastykarz waldekmastykarz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. No further comments.

@waldekmastykarz waldekmastykarz merged commit 3950d07 into dotnet:main Oct 17, 2025
4 checks passed
@bartizan bartizan deleted the 1419_not-found-auth-header-error branch October 17, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add error logging for a missing Authorization header during the minimal permission check

3 participants