fix(sbi/consumer): nil-check JsonData on UEContextTransfer 200 response#214
Open
SAY-5 wants to merge 1 commit into
Open
fix(sbi/consumer): nil-check JsonData on UEContextTransfer 200 response#214SAY-5 wants to merge 1 commit into
SAY-5 wants to merge 1 commit into
Conversation
Contributor
Author
|
Updated PR title to match Conventional Commits format. |
f368456 to
f3574ba
Compare
Contributor
Author
|
Amended commit message to match Conventional Commits format. |
Contributor
Author
|
Done, trimmed verbose comments and moved context to the PR description. Thanks @roundspring2003! |
1d9f898 to
f57d41c
Compare
Contributor
Author
|
Squashed commits to fix Conventional Commits check. |
Contributor
|
@SAY-5 plz help to fix the conflict |
Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com>
f57d41c to
8dfd855
Compare
Contributor
Author
|
The branch currently shows as mergeable against main with all checks green, so there is no conflict to resolve right now. Let me know if anything else is needed. |
Alonza0314
reviewed
May 28, 2026
| ueContextTransferRspData = res.UeContextTransferResponse200.JsonData | ||
| if ueContextTransferRspData == nil { | ||
| logger.ConsumerLog.Warnln("UeContextTransfer 200 response missing JsonData") | ||
| err = openapi.ReportError("UeContextTransfer 200 missing JsonData") |
Member
There was a problem hiding this comment.
Hi @SAY-5 ,
I think it will be better to update the problem detail before the error return after we get in the nil error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes free5gc/free5gc#1045.
UEContextTransferRequestindexedres.UeContextTransferResponse200.JsonDataand immediately dereferenced it for the debug log, butJsonDatais*UeContextTransferRspData,omitemptyin the OpenAPI model. A source AMF returning a syntactically-valid 200 OK with thejsonDatapart absent, pickedapplication/jsonovermultipart/related, or sent an empty body, reached here with the pointer nil and the deref panicked the target AMF during cross-AMF UE mobility / 5G-GUTI re-registration.Guard the deref and surface a clear
UeContextTransfer 200 missing JsonDataerror so the caller can fall through to the foreign-GUAMI handling path instead of crashing.