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: set correct error variable when put distributions #538

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

okomio
Copy link
Contributor

@okomio okomio commented Jun 27, 2023

Description

Hi everyone involved!
I noticed that if an error occurs on the DB side during the put distributions operation, a non-user-friendly message appeared in the popup dialog (see below). A quick analysis of the code revealed that the wrong error variable is passed to the response.
image

Motivation and Context

If something goes wrong when updating distribution, a user-friendly error message should be displayed.

How Has This Been Tested?

It's a super clear, one-line fix that does not require any special testing or any additional effort.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

Codecov Report

Merging #538 (237af5b) into main (10f5e51) will not change coverage.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##             main     #538   +/-   ##
=======================================
  Coverage   80.96%   80.96%           
=======================================
  Files          28       28           
  Lines        2222     2222           
=======================================
  Hits         1799     1799           
  Misses        334      334           
  Partials       89       89           
Impacted Files Coverage Δ
pkg/handler/crud.go 86.32% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@nothing0012 nothing0012 merged commit 2eee864 into openflagr:main Jun 28, 2023
8 checks passed
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.

None yet

3 participants