Commit 89948496 authored by Mark Florian's avatar Mark Florian Committed by Martin Wortschack

Display error when license report fails to load

Fixes https://gitlab.com/gitlab-org/gitlab/issues/200013.
parent 146eef9f
...@@ -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