Skip to content

Commit

Permalink
improve error message %on NotifyContactRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Jun 27, 2023
1 parent b714b37 commit 41940b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class NotifyContactRequest extends TransactionalUseCase<ContactEstablishm

if (!appellationLabel)
throw new BadRequestError(
`Establishment don't have immersion offers with appelation code '${payload.appellationCode}'.`,
`Establishment with siret '${payload.siret}' doesn't have an immersion offer with appellation code '${payload.appellationCode}'.`,
);

switch (payload.contactMode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ describe("NotifyContactRequest", () => {
await expectPromiseToFailWithError(
notifyContactRequest.execute(payload),
new BadRequestError(
`Establishment don't have immersion offers with appelation code '${payload.appellationCode}'.`,
`Establishment with siret '${payload.siret}' doesn't have an immersion offer with appellation code '${payload.appellationCode}'.`,
),
);
});
Expand Down

0 comments on commit 41940b3

Please sign in to comment.