Commit 18534ff0 authored by Tom Quirk's avatar Tom Quirk

Improve readability of Jira issues error handling

parent fb873053
......@@ -128,9 +128,8 @@ export default {
})
.catch((error) => {
this.issuesListLoadFailed = true;
const errorMessage =
(error?.response?.data?.errors || [])[0] ||
__('An error occurred while loading issues');
const errors = error?.response?.data?.errors || [];
const errorMessage = errors[0] || __('An error occurred while loading issues');
createFlash({
message: errorMessage,
......
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