mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 21:35:23 +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
|
@ -5,6 +5,7 @@ import { EnvironmentId } from '@/react/portainer/environments/types';
|
|||
import { Registry } from '@/react/portainer/registries/types/registry';
|
||||
|
||||
import { buildImageFullURI } from '../utils';
|
||||
import { addNodeHeader } from '../../proxy/addNodeHeader';
|
||||
|
||||
import { encodeRegistryCredentials } from './encodeRegistryCredentials';
|
||||
import { buildProxyUrl } from './build-url';
|
||||
|
@ -31,13 +32,11 @@ export async function pullImage({
|
|||
|
||||
const imageURI = buildImageFullURI(image, registry);
|
||||
|
||||
const headers: RawAxiosRequestHeaders = {
|
||||
const authHeaders: RawAxiosRequestHeaders = {
|
||||
'X-Registry-Auth': authenticationDetails,
|
||||
};
|
||||
|
||||
if (nodeName) {
|
||||
headers['X-PortainerAgent-Target'] = nodeName;
|
||||
}
|
||||
const headers = addNodeHeader(nodeName, authHeaders);
|
||||
|
||||
try {
|
||||
await axios.post(buildProxyUrl(environmentId, { action: 'create' }), null, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue