Skip to content

Commit

Permalink
Merge pull request #5998 from NMDSdevopsServiceAdm/improve-exception-…
Browse files Browse the repository at this point in the history
…logging

add fields to exception
  • Loading branch information
magicmilo authored Dec 1, 2023
2 parents 37a2a45 + 75fd3f1 commit ff4e349
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class EstablishmentSaveException extends EstablishmentException {

get safe() {
if (super.id === null) {
return `Failed to create Establishment with identity: ${super.name}:(${super.identifier}).`;
return `Failed to create Establishment with identity: ${super.name}:(${super.identifier}). err:${super.err}. safeErr:${super.safeErr}`;
} else if (!super.safeErr) {
return `Failed to save Establishment with identity: ${super.name}:(${super.identifier}).`;
return `Failed to save Establishment with identity: ${super.name}:(${super.identifier}). err:${super.err}. safeErr:${super.safeErr}`;
} else {
return super.safe;
}
Expand Down

0 comments on commit ff4e349

Please sign in to comment.