-
Notifications
You must be signed in to change notification settings - Fork 60
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
Behaviour when extending not AVAILABLE session #351
Comments
Hi @jlurien, Thanks for bringing this to our attention. Regarding the expected behavior when extending the duration of a session in a status other than For sessions with qosStatus = REQUESTED For sessions with qosStatus = UNAVAILABLE {
"status": 409,
"code": "SESSION_EXTENSION_NOT_ALLOWED",
"message": "Extending the session duration is not allowed in the current state ({qosStatus}). The session must be in the AVAILABLE state."
} By returning an error in both cases, we maintain consistency and avoid potential ambiguities. Wdyt? cc @hdamker |
@jlurien @maxl2287 Seems that there are no more opinions yet. Do we want to follow the path to return errors if the session is not in state AVAILABLE? In this case I would propose a small addition in the description of the operation: Current: Regarding the error code we can then go with 400 ("Bad Request"), adding the following example within GenericExtendSessionDuration400:
WDYT? Doing it still for 0.11.0? Adding only the description clarification (that would keep the options how to react open) or also the error example? In both option, I can create the PR asap. |
Going for an error makes sense to me, but in this case probably 409, as @maxl2287 suggests, is more suitable than 400 as the problem is with the status of the session in the server. code QUALITY_ON_DEMAND.SESSION_EXTENSION_NOT_ALLOWED is OK |
@jlurien 409 is also ok for me. |
New test scenario for this case is:
already added to #349 |
Fix for camaraproject#351 as discussed
PR #356 created for the spec. With the following new error response schema:
|
It's "example" -> "examples" |
Thanks for catching this. Corrected in PR and in above comment. |
Problem description
Current spec do not indicate the expected behaviour when the extension of the duration of a session in status other than AVAILABLE is requested
Expected action
Agree on the expected result, and update spec and tests.
For sessions with qosStatus = REQUESTED, implementation may accept the request and take into account the petition when the session is activated, or return a success without modifying the original duration (ignoring the request), or even return an error indicating that this request is not acceptable in the current state.
For sessions with qosStatus = UNAVAILABLE, implementation may return a success without modifying the duration (ignoring the request), or return an error indicating that this request is not acceptable in the current state.
The text was updated successfully, but these errors were encountered: