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

Add ApiEndpoint to NetworkException #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Leo506
Copy link
Contributor

@Leo506 Leo506 commented Jul 13, 2023

Reopen PR because of git troubles.

Last problem that we disscussed: whether the Endpoint property should be nullable or not. I think yes, beacause we have NativeHttpClient that sends HttpRequestMessages and do not know anything about ApiEndpoint, but can throw NetworkException (e.g. HttpTimeoutException)

Related issue: #9

@evgenyvalavin
Copy link
Contributor

evgenyvalavin commented Aug 29, 2023

In my opinion HttpTimeoutException cannot be thrown without an endpoint. Otherwise what will cause the exception?

@evgenyvalavin evgenyvalavin self-requested a review August 29, 2023 12:05
@evgenyvalavin
Copy link
Contributor

Seems like we've forgotten about this PR...
Let's bring it to live

@evgenyvalavin
Copy link
Contributor

I think there's no way a instance of NetworkException can be thrown without running an Endpoint.
Feels like there will always be an instance of Endpoint in an NetworkException.
The idea is to make an Endpoint required in NetworkException

Copy link
Contributor

@evgenyvalavin evgenyvalavin left a comment

Choose a reason for hiding this comment

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

Waiting for a response on the Required Endpoint idea

@evgenyvalavin evgenyvalavin linked an issue Jul 5, 2024 that may be closed by this pull request
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.

Add a ctor with ApiEndoint parameter to NetworkException
2 participants