Commit 799f9e3f authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '200013-render-error-in-license-compliance-ee' into 'master'

Display error when license report fails to load

Closes #200013

See merge request gitlab-org/gitlab!24201
parents 47db8303 89948496
...@@ -81,8 +81,8 @@ export const loadParsedLicenseReport = ({ dispatch, state }) => { ...@@ -81,8 +81,8 @@ export const loadParsedLicenseReport = ({ dispatch, state }) => {
const existingLicenses = (data.existing_licenses || []).map(convertToOldReportFormat); const existingLicenses = (data.existing_licenses || []).map(convertToOldReportFormat);
dispatch('receiveLoadParsedLicenseReport', { newLicenses, existingLicenses }); dispatch('receiveLoadParsedLicenseReport', { newLicenses, existingLicenses });
}) })
.catch(() => { .catch(error => {
dispatch('receiveLoadLicenseReportError'); dispatch('receiveLoadLicenseReportError', error);
}); });
}; };
......
---
title: Display error message in MR License Report if it fails to load
merge_request: 24201
author:
type: fixed
...@@ -596,7 +596,10 @@ describe('License store actions', () => { ...@@ -596,7 +596,10 @@ describe('License store actions', () => {
null, null,
state, state,
[], [],
[{ type: 'requestLoadParsedLicenseReport' }, { type: 'receiveLoadLicenseReportError' }], [
{ type: 'requestLoadParsedLicenseReport' },
{ type: 'receiveLoadLicenseReportError', payload: jasmine.any(Error) },
],
) )
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment