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

DB Query details in error message when "attempting to close a settlement window on an ID that does not exist" #617

Closed
1 task done
elnyry-sam-k opened this issue Feb 8, 2019 · 1 comment
Assignees
Milestone

Comments

@elnyry-sam-k
Copy link
Member

elnyry-sam-k commented Feb 8, 2019

Summary:
As can be seen in the snippet in the below sections, (SQL query details being displayed) the DB Query detail is being shown in error message when "attempting to close a settlement window on an ID that does not exist". This is neither safe nor graceful and needs to be addressed.

Severity:
Medium
(Since the attempt itself is wrong and an error is being given)

Priority:
medium

Expected Behavior

  1. When an attempt is made to close a Settlement window, it is either closed if its a valid request or
  2. An error message is thrown with only necessary details if its an invalid request.

Steps to Reproduce

  1. After deployment of a ML Switch, attempt to close a Settlement window with a non-existing settlement window ID
  2. An error message is thrown. Below is the response
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": {
        "errorInformation": {
            "errorDescription": "insert into `settlementWindowStateChange` (`createdDate`, `reason`, `settlementWindowId`, `settlementWindowStateId`) values ('2019-02-07 19:05:41.162', 'string', 4, 'CLOSED') - ER_NO_REFERENCED_ROW_2: Cannot add or update a child row: a foreign key constraint fails (`central_ledger`.`settlementWindowStateChange`, CONSTRAINT `settlementwindowstatechange_settlementwindowid_foreign` FOREIGN KEY (`settlementWindowId`) REFERENCES `settlementWindow` (`settlemen)"
        }
    }
}

Pull Requests:

Specifications

  • Component (if known): Switch Operations
  • Version: v5.1.0
  • Platform: AWS Dev
  • Subsystem: central-settlement
  • Type of testing: Functional/Regression
  • Bug found/raised by: @sri-miriyala

Notes:

  • Severity when opened: Medium
  • Priority when opened: Medium
@elnyry-sam-k elnyry-sam-k added this to the Sprint 5.1 milestone Feb 8, 2019
@ggrg ggrg self-assigned this Feb 8, 2019
@elnyry-sam-k elnyry-sam-k changed the title Too much detail in error message when "attempting to close a settlement window on an ID that does not exist" DB Query details in error message when "attempting to close a settlement window on an ID that does not exist" Feb 8, 2019
@ggrg ggrg closed this as completed Feb 8, 2019
@sri-miriyala
Copy link

This issue is resolved with v5.1.2.
screen shot 2019-02-12 at 8 06 56 am

Hence closing.

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

No branches or pull requests

3 participants