Skip to content

Conversation

@hubertp-ericsson
Copy link
Contributor

@hubertp-ericsson hubertp-ericsson commented Sep 29, 2025

What type of PR is this?

Add one of the following kinds:

  • enhancement/feature

What this PR does / why we need it:

This proposal adds a new error code INCOMPATIBLE_STATE to 409 generic response to indicate that a dedicated network is in an incompatible state (e.g. TERMINATED) when a new device access to that network is requested. It provides clear information to the client about the reason why its request cannot be fulfilled.

The proposed code is assumed to have traversal scope because "state" is considered generic. Therefore the template extension format {{SPECIFIC_CODE}} and not {{API_NAME}}.{{SPECIFIC_CODE}} is used. The corresponding PR has been raised in Commonalities: https://github.com/camaraproject/Commonalities/pull/550 .

The proposed change is now aligned with the above PR accepted in Commonalities where INCOMPATIBLE_STATE replaced the original proposal of INCOMPATIBLE_STATE.

Which issue(s) this PR fixes:

Fixes #46

Special notes for reviewers:

Changelog input

 
New 409 Error Code called INCOMPATIBLE_STATE is used, indicating that the dedicated network resource referenced in the POST request is in an incompatible state, e.g. in TERMINATED state.


Additional documentation

This section can be blank.

docs

tlohmar
tlohmar previously approved these changes Oct 20, 2025
Copy link
Contributor

@tlohmar tlohmar left a comment

Choose a reason for hiding this comment

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

Looks good. I created an according PR in commonalities, adding WRONG_STATE there.

@hdamker
Copy link
Contributor

hdamker commented Oct 30, 2025

Until there is a definition within Commonalities the following note would apply to the additional "409 WRONG_STATE":

NOTE 2: A {{SPECIFIC_CODE}}, unless it may have traversal scope (i.e. re-usable among different APIs), SHALL follow this scheme for a specific API: {{API_NAME}}.{{SPECIFIC_CODE}}

But it might be safe to assume that this code has traversal scope, if "state" is considered generic.

@tlohmar I don't see a reference to the Commonalities issue here, could you add this?

@tlohmar
Copy link
Contributor

tlohmar commented Oct 30, 2025

Until there is a definition within Commonalities the following note would apply to the additional "409 WRONG_STATE":

NOTE 2: A {{SPECIFIC_CODE}}, unless it may have traversal scope (i.e. re-usable among different APIs), SHALL follow this scheme for a specific API: {{API_NAME}}.{{SPECIFIC_CODE}}

But it might be safe to assume that this code has traversal scope, if "state" is considered generic.

@tlohmar I don't see a reference to the Commonalities issue here, could you add this?

There is Commonalities PR#550 proposing WRONG_STATE as new error code and a Commonalities PR#541 on this NOTE 2.

@hubertp-ericsson
Copy link
Contributor Author

I have updated the PR description by adding the reference to the Commonalities PR and explanation of the chosen template extension format.

@hubertp-ericsson
Copy link
Contributor Author

Aligned this PR with the Commonalities PR https://github.com/camaraproject/Commonalities/pull/550 which has been finalised.

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.

[Accesses API] Improve error handling when access is requested at incorrect time

3 participants