diff --git a/backend/services/partnerNetwork/referrals.js b/backend/services/partnerNetwork/referrals.js index 6a68b02a..103c9f0c 100644 --- a/backend/services/partnerNetwork/referrals.js +++ b/backend/services/partnerNetwork/referrals.js @@ -109,7 +109,7 @@ async function sendReferral(req, res, next) { clearTimeout(timeout); if (response.status >= 400 && response.status < 600) { - return res.status(response.status).json({message: 'Bad response from receiver: ' + response.status}); + return res.status(response.status).json({message: 'Bad response from receiver: ' + response.status + (response.message ? ': ' + response.message : null)}); } return res.status(202).json({success: true, message: `Successfully created and sent a referral`}); } catch (e) {