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

Extend ConnectivityStatus with UNKNOWN #148

Closed
maxl2287 opened this issue May 2, 2024 · 12 comments
Closed

Extend ConnectivityStatus with UNKNOWN #148

maxl2287 opened this issue May 2, 2024 · 12 comments
Labels
enhancement New feature or request v0.7.0 Planned for release v0.7.0

Comments

@maxl2287
Copy link
Contributor

maxl2287 commented May 2, 2024

Problem description
When the service tries to call the network to get some information, but the network cannot deliver either information about DATA nor SMS, then we cannot respond with "NOT_CONNECTED", but we need to communicate to the consumer that the network was not able to deliver a current status of connection.

Possible evolution
Add a new connectivity-status UNKNOWN

@maxl2287 maxl2287 added the enhancement New feature or request label May 2, 2024
@sachinvodafone
Copy link
Collaborator

It seems, we have a similar issue against issue-138

@akoshunyadi akoshunyadi added the v0.7.0 Planned for release v0.7.0 label May 8, 2024
@murthygorty
Copy link

hmm..mm @maxl2287 why wouldn't the API return a temporary error if it is unable to determine the connectivity status?
cc: @NoelWirzius @gmuratk

@sachinvodafone
Copy link
Collaborator

There could be some potential use-cases for "Unknown" status:

  • The network is partly down, so some services like voice calls work, but others like data or SMS don't work properly.
  • When there is too much network traffic, some requests like data or SMS might be delayed or fail.
  • The service provider's systems have problems, so they can't provide certain information.

@bigludo7
Copy link
Collaborator

Tricky question...
I checked on Device location...

  • In Location Retrieval if we are not able to locate the mobile within the required freshness we send back a 422
  • In location Verification if we're not able to check the mobile location we send back a 200 with a "verificationResult": "UNKNOWN"

I tend to prefer 422 for our API as easier for my perspective to differentiate "business" valuable response.

@sachinvodafone
Copy link
Collaborator

Thanks @bigludo7 for more insight on this and I would also prefer 422 in this case where it explicitly indicates a failure to process the request due to some unknown network issue.

@fernandopradocabrillo
Copy link
Collaborator

I also tend to agree with the 422. It should not be a successful response and we should not charge for something that is not client's fault.

@maxl2287
Copy link
Contributor Author

@jlurien @bigludo7 I guess we can transform this issue into:
"Respond with HTTP-422 when the service is unable to provide information about the current connectivity".

Wdyt?

@bigludo7
Copy link
Collaborator

@jlurien @bigludo7 I guess we can transform this issue into: "Respond with HTTP-422 when the service is unable to provide information about the current connectivity".

Wdyt?

Yes !
Seems that we have a consensus to send back a 422 when we're not able to get the connectivity status.
We could probably make a PR for that and update this. What do you think @akoshunyadi ? are we still in time to do that for this release?

@akoshunyadi
Copy link
Collaborator

We have already GENERIC_422_UNABLE_TO_PROVIDE_REACHABILITY_STATUS , that's for that case, isn't it?

@bigludo7
Copy link
Collaborator

We have already GENERIC_422_UNABLE_TO_PROVIDE_REACHABILITY_STATUS , that's for that case, isn't it?

oh ! yes we have it already. Thanks.
So nothing to do on the yaml - we're good.

@maxl2287
Copy link
Contributor Author

Can we close then this issue here?

@bigludo7
Copy link
Collaborator

Can we close then this issue here?

+1

@maxl2287 maxl2287 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v0.7.0 Planned for release v0.7.0
Projects
None yet
Development

No branches or pull requests

6 participants