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

fix(swr): error type is correct even when it's the same type as success type #1276

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

AllieJonsson
Copy link
Contributor

Status

READY

Description

Fixes #1256
Problem was that the error type was getting filtered out as it was equal to the success type, resulting in error being unknown.

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

  1. cd tests
  2. yarn generate:swr
  3. check generated/swr/errors/endpoints.ts
  4. export type CreateItemsQueryError = AxiosError<Item>
  5. compared to previous build, where it would be export type CreateItemsQueryError = AxiosError<unknown>

@melloware melloware added this to the 6.26.0 milestone Mar 21, 2024
@melloware melloware added the bug Something isn't working label Mar 21, 2024
@melloware melloware merged commit 6e521b5 into orval-labs:master Mar 21, 2024
2 checks passed
@AllieJonsson AllieJonsson deleted the fix/error-duplicate-type branch March 21, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unknown error type when using duplicate reference
2 participants