Skip to content

Conversation

@omnibs
Copy link
Member

@omnibs omnibs commented Aug 20, 2025

(see commit message comments)

omnibs added 3 commits August 20, 2025 15:50
`ExpectBytesResponse` and `ExpectTextResponse` can have different error
types in their `HttpRequest' e a`

Printing the full type helps us consider that when inspecting our mocks
Debug.todo is firing here. It shouldn't, but I don't see a way to fix
it, since `ExpectText` and `ExpectBytesResponse` can both pack anything
as their error type.
@omnibs omnibs changed the title expectBytes: error type mismatch is ... awkward expectBytes: mismatches on Http.Request' errorType are ... awkward Aug 20, 2025
handleCustomResponse f = case f (Internal.NetworkError_ msg) of
Err err -> Task.fail err
Ok _ -> Debug.todo "Since we manually craft the Response as an Error, this case will not run."
Ok _ -> Debug.todo msg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Developer: "This thing will not happen"...
Real world: Thing happens
😅

Copy link
Member Author

@omnibs omnibs Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's super weird is this was not happening on your branch in the monorepo

you were getting a message saying "no stub for GoogleWhatevsResponse" instead of hitting the Debug.todo

here in haskell-libraries i was hitting the Debug.todo

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

Successfully merging this pull request may close these issues.

3 participants