Skip to content

Commit

Permalink
fix: message
Browse files Browse the repository at this point in the history
  • Loading branch information
dadiorchen committed Mar 16, 2022
1 parent 3ad0d67 commit 31842e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/models/Earnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ const updateEarnings = async (earningsRepo, requestBody) => {

const earnings = await earningsRepo.getById(body.id);


if (earnings.status !== 'calculated')
throw new HttpError(409, 'Earnings have either been paid or cancelled');
throw new HttpError(409, 'There are some earnings records in this file have been paid or canceled');

if (earnings.payment_confirmation_id)
throw new HttpError(409, 'Earnings already have a payment_confirmation_id');
Expand Down

0 comments on commit 31842e7

Please sign in to comment.