Skip to content

Commit

Permalink
fix: audit proper variable in error counter (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleyow authored Dec 12, 2024
1 parent 2620dc4 commit d2a06e0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/domain/oracle/oracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ exports.createOracle = async (payload) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'createOracle',
step
Expand Down Expand Up @@ -163,7 +163,7 @@ exports.getOracle = async (query) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'getOracle',
step
Expand Down Expand Up @@ -250,7 +250,7 @@ exports.updateOracle = async (params, payload) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'updateOracle',
step
Expand Down Expand Up @@ -284,7 +284,7 @@ exports.deleteOracle = async (params) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'deleteOracle'
})
Expand Down
12 changes: 6 additions & 6 deletions src/domain/participants/participants.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const getParticipantsByTypeAndID = async (headers, params, method, query, span,
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'getParticipantsByTypeAndID',
step
Expand Down Expand Up @@ -252,7 +252,7 @@ const putParticipantsByTypeAndID = async (headers, params, method, payload, cach
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'putParticipantsByTypeAndID',
step
Expand Down Expand Up @@ -328,7 +328,7 @@ const putParticipantsErrorByTypeAndID = async (headers, params, payload, dataUri
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'putParticipantsErrorByTypeAndID',
step
Expand Down Expand Up @@ -434,7 +434,7 @@ const postParticipants = async (headers, method, params, payload, span, cache) =
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'postParticipants',
step
Expand Down Expand Up @@ -566,7 +566,7 @@ const postParticipantsBatch = async (headers, method, requestPayload, span) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'postParticipantsBatch',
step
Expand Down Expand Up @@ -662,7 +662,7 @@ const deleteParticipants = async (headers, params, method, query, cache) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'deleteParticipants',
step
Expand Down
2 changes: 1 addition & 1 deletion src/domain/parties/getPartiesByTypeAndID.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const getPartiesByTypeAndID = async (headers, params, method, query, span, cache
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'getPartiesByTypeAndID',
step
Expand Down
4 changes: 2 additions & 2 deletions src/domain/parties/parties.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const putPartiesByTypeAndID = async (headers, params, method, payload, dataUri,
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'putPartiesByTypeAndID',
step
Expand Down Expand Up @@ -223,7 +223,7 @@ const putPartiesErrorByTypeAndID = async (headers, params, payload, dataUri, spa
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'putPartiesErrorByTypeAndID',
step
Expand Down
2 changes: 1 addition & 1 deletion src/domain/timeout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const sendTimeoutCallback = async (cacheKey) => {
const extensions = err.extensions || []
const system = extensions.find((element) => element.key === 'system')?.value || ''
errorCounter.inc({
code: fspiopError?.apiErrorCode,
code: fspiopError?.apiErrorCode?.code,
system,
operation: 'sendTimeoutCallback',
step
Expand Down

0 comments on commit d2a06e0

Please sign in to comment.