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

BED-5022 Handle GetDatapipeStatus Errors #976

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mvlipka
Copy link
Contributor

@mvlipka mvlipka commented Nov 22, 2024

Description

In certain environments, it was found that the /api/v2/datapipe/status endpoint was occasionally returning a 200 status, but without a response. The GetDatapipeStatus database call currently only checks for an error if no rows were returned, but does not catch all errors that can result from this query.

Motivation and Context

This PR addresses: BED-5022

This change now allows all database errors to be bubbled up to the api and subsequently returned to the user so that we may monitor this issue more closely and narrow down potential problems.

How Has This Been Tested?

Additional unit tests were added to the GetDatapipeStatus endpoint

Screenshots (optional):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

@mvlipka mvlipka added bug Something isn't working api A pull request containing changes affecting the API code. labels Nov 22, 2024
@mvlipka mvlipka changed the title BED-5022 return all database errors from GetDatapipeStatus and added … BED-5022 Handle GetDatapipeStatus Errors Nov 22, 2024
@@ -165,8 +165,7 @@ type Database interface {
AnalysisRequestData

// Datapipe Status
SetDatapipeStatus(ctx context.Context, status model.DatapipeStatus, updateAnalysisTime bool) error
GetDatapipeStatus(ctx context.Context) (model.DatapipeStatusWrapper, error)
DatapipeStatusData
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api A pull request containing changes affecting the API code. bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants