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

return 404 instead of 500 for missing agent config name #384

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

ruanyl
Copy link
Member

@ruanyl ruanyl commented Dec 27, 2024

Description

  1. Return HTTP 404 instead of 500 for missing agent config name
  2. Extract error handling logic to a reusable function
  3. For 5xx errors, instead of returning 500, now returning their original error code

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test.
  • New functionality has user manual doc added.
  • Commits are signed per the DCO using --signoff.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Yulong Ruan <[email protected]>
@ruanyl ruanyl added the backport 2.x Trigger the backport flow to 2.x label Jan 6, 2025
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.96%. Comparing base (581a7ca) to head (c0c5fc5).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
- Coverage   87.46%   84.96%   -2.51%     
==========================================
  Files          65       72       +7     
  Lines        1891     2068     +177     
  Branches      473      502      +29     
==========================================
+ Hits         1654     1757     +103     
- Misses        236      310      +74     
  Partials        1        1              

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

@ruanyl ruanyl merged commit ca13184 into opensearch-project:main Jan 6, 2025
12 of 13 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 6, 2025
* return 404 instead of 500 for missing agent config name

Signed-off-by: Yulong Ruan <[email protected]>

* add CHANGELOG

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
(cherry picked from commit ca13184)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
raintygao pushed a commit to raintygao/dashboards-assistant that referenced this pull request Jan 22, 2025
…roject#384)

* return 404 instead of 500 for missing agent config name

Signed-off-by: Yulong Ruan <[email protected]>

* add CHANGELOG

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
SuZhou-Joe pushed a commit that referenced this pull request Jan 24, 2025
* return 404 instead of 500 for missing agent config name

Signed-off-by: Yulong Ruan <[email protected]>

* add CHANGELOG

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
(cherry picked from commit ca13184)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Trigger the backport flow to 2.x v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants