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

If non-subscribed UEs send RegistrationRequest, AMF does not return RegistrationReject and the resource will remain. #6

Merged
merged 2 commits into from
Oct 27, 2022

Conversation

RyuichiNamba-fj
Copy link
Contributor

No description provided.

@@ -305,6 +305,10 @@ func HandleQueryAuthSubsData(request *httpwrapper.Request) *httpwrapper.Response
func QueryAuthSubsDataProcedure(collName string, ueId string) (map[string]interface{}, *models.ProblemDetails) {
filter := bson.M{"ueId": ueId}
data, pd := getDataFromDB(collName, filter)
if pd != nil && pd.Status == 404 {
Copy link
Collaborator

@tim-ywliu tim-ywliu Oct 27, 2022

Choose a reason for hiding this comment

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

Why need to add this? For changing the log level to Warn? It returns the same thing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is better to replace 404 with http.StatusNotFound.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And can combine these 2 if:

	if pd != nil {
		if pd.Status == http.StatusNotFound {
			logger.DataRepoLog.Warnf("QueryAuthSubsDataProcedure err: %s", pd.Title)
		} else {
			logger.DataRepoLog.Errorf("QueryAuthSubsDataProcedure err: %s", pd.Detail)
		}
		return nil, pd
	}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have made this modification because I have decided that in the case of per-user errors such as this one, a log level of Warning is more appropriate than Error.

And I have fixed and PR as you suggested.

@tim-ywliu tim-ywliu merged commit 05c2d7f into free5gc:main Oct 27, 2022
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.

2 participants