Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ce-deploy-ui
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ccce
dev
ce-deploy-ui
Commits
2c03cb57
Commit
2c03cb57
authored
7 months ago
by
Max Frederiksen
Committed by
Max Frederiksen
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
use getErrorMessage in DeployIOC and UndeployIOC
parent
a73b842f
No related branches found
No related tags found
3 merge requests
!542
Prepare 4.1.0
,
!540
Sync
,
!533
CE-3015: Implement correct error handling for operation errors
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/IOC/DeployIOC/DeployIOC.js
+2
-5
2 additions, 5 deletions
src/components/IOC/DeployIOC/DeployIOC.js
src/components/IOC/UndeployIOC/UndeployIOC.js
+2
-1
2 additions, 1 deletion
src/components/IOC/UndeployIOC/UndeployIOC.js
with
4 additions
and
6 deletions
src/components/IOC/DeployIOC/DeployIOC.js
+
2
−
5
View file @
2c03cb57
...
@@ -3,6 +3,7 @@ import { Navigate } from "react-router-dom";
...
@@ -3,6 +3,7 @@ import { Navigate } from "react-router-dom";
import
{
IOCDeployDialog
}
from
"
../IOCDeployDialog
"
;
import
{
IOCDeployDialog
}
from
"
../IOCDeployDialog
"
;
import
{
apiContext
}
from
"
../../../api/DeployApi
"
;
import
{
apiContext
}
from
"
../../../api/DeployApi
"
;
import
{
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
getErrorMessage
}
from
"
../../common/Helper
"
;
// Process component
// Process component
export
function
DeployIOC
({
export
function
DeployIOC
({
...
@@ -29,11 +30,7 @@ export function DeployIOC({
...
@@ -29,11 +30,7 @@ export function DeployIOC({
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
deployError
)
{
if
(
deployError
)
{
setButtonDisabled
(
false
);
setButtonDisabled
(
false
);
setError
(
setError
(
getErrorMessage
(
deployError
));
deployError
?.
response
?.
body
?.
description
??
deployError
?.
message
??
"
An unknown error occurred
"
);
}
}
},
[
deployError
,
setButtonDisabled
]);
},
[
deployError
,
setButtonDisabled
]);
...
...
This diff is collapsed.
Click to expand it.
src/components/IOC/UndeployIOC/UndeployIOC.js
+
2
−
1
View file @
2c03cb57
...
@@ -3,6 +3,7 @@ import { Navigate } from "react-router-dom";
...
@@ -3,6 +3,7 @@ import { Navigate } from "react-router-dom";
import
{
IOCUndeployDialog
}
from
"
../IOCUndeployDialog
"
;
import
{
IOCUndeployDialog
}
from
"
../IOCUndeployDialog
"
;
import
{
apiContext
}
from
"
../../../api/DeployApi
"
;
import
{
apiContext
}
from
"
../../../api/DeployApi
"
;
import
{
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
useAPIMethod
}
from
"
@ess-ics/ce-ui-common
"
;
import
{
getErrorMessage
}
from
"
../../common/Helper
"
;
// Process component
// Process component
export
function
UndeployIOC
({
export
function
UndeployIOC
({
...
@@ -27,7 +28,7 @@ export function UndeployIOC({
...
@@ -27,7 +28,7 @@ export function UndeployIOC({
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
deploymentError
)
{
if
(
deploymentError
)
{
setButtonDisabled
(
false
);
setButtonDisabled
(
false
);
setError
(
deploymentError
?.
message
);
setError
(
getErrorMessage
(
deploymentError
)
);
}
}
},
[
deploymentError
,
setButtonDisabled
]);
},
[
deploymentError
,
setButtonDisabled
]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment