Skip to content

Enhance MsdlProxy with IHttpClientFactory and error handling - #1728

Merged
clairernovotny merged 1 commit into
mainfrom
function-update
Apr 2, 2025
Merged

clairernovotny merged 1 commit into
mainfrom
function-update

Conversation

@clairernovotny

Copy link
Copy Markdown
Member

Enhance MsdlProxy with IHttpClientFactory and error handling

  • Added IHttpClientFactory dependency for better HttpClient management.
  • Implemented validation for the presence of the symbolkey query parameter, logging a warning and returning a BadRequest response if missing.
  • Replaced direct HttpClient instantiation with the factory method to improve resource management.
  • Enhanced error handling with a try-catch block, logging exceptions and returning an InternalServerError response when needed.
  • Passed cancellation token to WriteBytesAsync for improved cancellation support.

- Added IHttpClientFactory dependency for better HttpClient management.
- Implemented validation for the presence of the symbolkey query parameter, logging a warning and returning a BadRequest response if missing.
- Replaced direct HttpClient instantiation with the factory method to improve resource management.
- Enhanced error handling with a try-catch block, logging exceptions and returning an InternalServerError response when needed.
- Passed cancellation token to WriteBytesAsync for improved cancellation support.
@clairernovotny
clairernovotny enabled auto-merge April 2, 2025 21:16
@github-actions

github-actions Bot commented Apr 2, 2025

Copy link
Copy Markdown

@clairernovotny
clairernovotny merged commit 6eac0cd into main Apr 2, 2025
@clairernovotny
clairernovotny deleted the function-update branch April 2, 2025 21:28
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.

1 participant