mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +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,10 +1,10 @@
|
|||
import { Resources, RestartPolicy } from 'docker-types/generated/1.41';
|
||||
import { RawAxiosRequestHeaders } from 'axios';
|
||||
|
||||
import axios, { parseAxiosError } from '@/portainer/services/axios';
|
||||
import { EnvironmentId } from '@/react/portainer/environments/types';
|
||||
|
||||
import { urlBuilder } from '../containers.service';
|
||||
import { addNodeHeader } from '../../proxy/addNodeHeader';
|
||||
|
||||
/**
|
||||
* UpdateConfig holds the mutable attributes of a Container.
|
||||
|
@ -22,11 +22,7 @@ export async function updateContainer(
|
|||
config: UpdateConfig,
|
||||
{ nodeName }: { nodeName?: string } = {}
|
||||
) {
|
||||
const headers: RawAxiosRequestHeaders = {};
|
||||
|
||||
if (nodeName) {
|
||||
headers['X-PortainerAgent-Target'] = nodeName;
|
||||
}
|
||||
const headers = addNodeHeader(nodeName);
|
||||
|
||||
try {
|
||||
await axios.post<{ Warnings: string[] }>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue