1
1
import { ComponentMeta , Story } from "@storybook/react"
2
2
import {
3
- makeMockApiError ,
3
+ makeMockValidationApiError ,
4
4
mockParameterSchema ,
5
5
MockParameterSchemas ,
6
6
MockTemplate ,
@@ -85,7 +85,7 @@ export const GetTemplatesError = Template.bind({})
85
85
GetTemplatesError . args = {
86
86
...Parameters . args ,
87
87
createWorkspaceErrors : {
88
- [ CreateWorkspaceErrors . GET_TEMPLATES_ERROR ] : makeMockApiError ( {
88
+ [ CreateWorkspaceErrors . GET_TEMPLATES_ERROR ] : makeMockValidationApiError ( {
89
89
message : "Failed to fetch templates." ,
90
90
detail : "You do not have permission to access this resource." ,
91
91
} ) ,
@@ -97,10 +97,11 @@ export const GetTemplateSchemaError = Template.bind({})
97
97
GetTemplateSchemaError . args = {
98
98
...Parameters . args ,
99
99
createWorkspaceErrors : {
100
- [ CreateWorkspaceErrors . GET_TEMPLATE_SCHEMA_ERROR ] : makeMockApiError ( {
101
- message : 'Failed to fetch template schema for "docker-amd64".' ,
102
- detail : "You do not have permission to access this resource." ,
103
- } ) ,
100
+ [ CreateWorkspaceErrors . GET_TEMPLATE_SCHEMA_ERROR ] :
101
+ makeMockValidationApiError ( {
102
+ message : 'Failed to fetch template schema for "docker-amd64".' ,
103
+ detail : "You do not have permission to access this resource." ,
104
+ } ) ,
104
105
} ,
105
106
hasTemplateErrors : true ,
106
107
}
@@ -109,7 +110,7 @@ export const CreateWorkspaceError = Template.bind({})
109
110
CreateWorkspaceError . args = {
110
111
...Parameters . args ,
111
112
createWorkspaceErrors : {
112
- [ CreateWorkspaceErrors . CREATE_WORKSPACE_ERROR ] : makeMockApiError ( {
113
+ [ CreateWorkspaceErrors . CREATE_WORKSPACE_ERROR ] : makeMockValidationApiError ( {
113
114
message :
114
115
'Workspace "test" already exists in the "docker-amd64" template.' ,
115
116
validations : [
0 commit comments