Skip to content

TimeoutException missing from package #1029

Closed

Description

@HenrikOssipoff

Checklist

  • The bug is reproducible against the latest release and/or master.
  • There are no similar issues or pull requests to fix it yet.

Describe the bug

According to the documentation, there should be an httpx.TimeoutException class that you can catch if you want to catch any timeout related exception. However, such exception doesn't exist.

To reproduce

import httpx
httpx.TimeoutException

Additional context

I'm assuming it's intended behaviour, and it's a case of the docs not being updated when introducing httpcore over urllib3. However, I'm unsure about what the correct approach now is; should one catch HTTPError instead, or are we forced to catch each individual timeout related exception?

Activity

  1. HenrikOssipoff commented on Jun 19, 2020

    @HenrikOssipoff
    Author

    I see now that the TimeoutException is living in httpcore since 0.13.
    I feel like this should be documented (did I miss it?).

    Would it maybe make more sense to wrap these exceptions in httpx instead, so that the user doesn't have to worry about the underlying library?

  2. johnanthonyowens commented on Jun 19, 2020

    @johnanthonyowens

    This is covered in #949.

  3. florimondmanca commented on Jun 20, 2020

    @florimondmanca
    Contributor

    Hey,

    As mentioned above this is part of a known issue tracked via #949, going to close this as a duplicate.

    Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions