Skip to content

Commit

Permalink
Changes error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gudjong committed Oct 24, 2024
1 parent b520e94 commit b8ffc8d
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,8 @@ export class SubpoenaService {
transaction,
})

if (numberOfAffectedRows !== 1) {
// Normally we would not tolerate it if the number of affected rows is 0
// but in this case the update comes from an external system and
// for now we want to prentend that it's ok.
if (numberOfAffectedRows > 1) {
// Tolerate failure, but log error
this.logger.error(
`Unexpected number of rows ${numberOfAffectedRows} affected when updating subpoena`,
)
Expand Down Expand Up @@ -226,10 +224,8 @@ export class SubpoenaService {
},
)

if (numberOfAffectedRows !== 1) {
// Normally we would not tolerate it if the number of affected rows is 0
// but in this case the update comes from an external system and
// for now we want to prentend that it's ok.
if (numberOfAffectedRows > 1) {
// Tolerate failure, but log error
this.logger.error(
`Unexpected number of rows ${numberOfAffectedRows} affected when updating defendant`,
)
Expand Down

0 comments on commit b8ffc8d

Please sign in to comment.