Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to parse #910

Open
pc00001 opened this issue Apr 12, 2024 · 1 comment
Open

Failed to parse #910

pc00001 opened this issue Apr 12, 2024 · 1 comment

Comments

@pc00001
Copy link

pc00001 commented Apr 12, 2024

We use a swagger gen .ts file in our project.

When using storybook 8.0.8 the following issue is reported
SyntaxError: .\src\Api\v1_0.swagger.ts: Unexpected token (2716:112)

2714 | result200 = null;
2715 | }

2716 | return Promise.resolve<SwaggerResponse<FileUploadMetadata[]>>(new SwaggerResponse<FileUploadMetadata[]>(status, _headers, result200));
| ^
2717 |
2718 | } else if (status !== 200 && status !== 204) {
2719 | const _responseText = response.data;

@ManasiRoy
Copy link

Can you please try this once -

if (status === 200) {
// Assuming result200 is defined earlier in the code
return Promise.resolve<SwaggerResponse<FileUploadMetadata[]>>(new SwaggerResponse<FileUploadMetadata[]>(status, _headers, result200));
} else if (status !== 204) {
const _responseText = response.data;
// Handle other statuses as needed
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants