mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 00:09:40 +02:00
fix(errors): surface react docker errors to front end [EE-7053] (#11726)
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
55667a878a
commit
6b5a402962
17 changed files with 107 additions and 142 deletions
|
@ -1,4 +1,4 @@
|
|||
import axios from '@/portainer/services/axios';
|
||||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { ImageStatus } from '@/react/docker/components/ImageStatus/types';
|
||||
|
||||
export async function getStackImagesStatus(id: number) {
|
||||
|
@ -8,9 +8,9 @@ export async function getStackImagesStatus(id: number) {
|
|||
);
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
Status: 'unknown',
|
||||
Message: `Unable to retrieve image status for stack: ${id}`,
|
||||
};
|
||||
throw parseAxiosError(
|
||||
e,
|
||||
`Unable to retrieve image status for stack: ${id}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue