Skip to content

Commit

Permalink
fixes (#245)
Browse files Browse the repository at this point in the history
* updated dependencies and removed old audit records

* updated to cater for parent spans finishing before the span can be closed and fixed tests

* fixing tests and some code found during testing

* needed to handle error in the model as the handler has already processed
  • Loading branch information
rmothilal authored Oct 6, 2020
1 parent 8bbf5d2 commit 9ac9910
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "quoting-service",
"description": "Quoting Service hosted by a scheme",
"license": "Apache-2.0",
"version": "11.1.3",
"version": "11.1.4",
"author": "ModusBox",
"contributors": [
"James Bush <james.bush@modusbox.com>",
Expand Down
2 changes: 2 additions & 0 deletions src/model/quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class QuotesModel {

const fspiopError = ErrorHandler.ReformatFSPIOPError(err)
const state = new EventSdk.EventStateMetadata(EventSdk.EventStatusType.failed, fspiopError.apiErrorCode.code, fspiopError.apiErrorCode.message)
await this.handleException(fspiopSource, quoteRequest.quoteId, fspiopError, headers, handleQuoteRequestSpan)
if (handleQuoteRequestSpan) {
await handleQuoteRequestSpan.error(fspiopError, state)
await handleQuoteRequestSpan.finish(fspiopError.message, state)
Expand Down Expand Up @@ -590,6 +591,7 @@ class QuotesModel {
}
const fspiopError = ErrorHandler.ReformatFSPIOPError(err)
const state = new EventSdk.EventStateMetadata(EventSdk.EventStatusType.failed, fspiopError.apiErrorCode.code, fspiopError.apiErrorCode.message)
await this.handleException(fspiopSource, quoteId, err, headers, handleQuoteUpdateSpan)
if (handleQuoteUpdateSpan) {
await handleQuoteUpdateSpan.error(fspiopError, state)
await handleQuoteUpdateSpan.finish(fspiopError.message, state)
Expand Down

0 comments on commit 9ac9910

Please sign in to comment.