diff --git a/src/course-outline/page-alerts/PageAlerts.jsx b/src/course-outline/page-alerts/PageAlerts.jsx index 4b12996395..dc8822f0c0 100644 --- a/src/course-outline/page-alerts/PageAlerts.jsx +++ b/src/course-outline/page-alerts/PageAlerts.jsx @@ -344,10 +344,18 @@ const PageAlerts = ({ let errorList = Object.entries(errors).filter(obj => obj[1] !== null).map(([k, v]) => { switch (v.type) { case API_ERROR_TYPES.serverError: + let description = v.data || intl.formatMessage(messages.serverErrorAlertBody); + let alertTitle = intl.formatMessage(messages.serverErrorAlert); + if (v.status === 403) { + description = intl.formatMessage(messages.forbiddenAlertBody, { + LMS: {intl.formatMessage(messages.forbiddenAlertLmsUrl)} + }); + alertTitle = intl.formatMessage(messages.forbiddenAlert); + } return { key: k, - desc: v.data || intl.formatMessage(messages.serverErrorAlertBody), - title: intl.formatMessage(messages.serverErrorAlert), + desc: description, + title: alertTitle, dismissible: v.dismissible, }; case API_ERROR_TYPES.networkError: @@ -378,7 +386,7 @@ const PageAlerts = ({ dismissError={() => dispatch(dismissError(msgObj.key))} > {msgObj.title} - {msgObj.desc && {msgObj.desc}} + {msgObj.desc} ) : (