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

Fix panic caused by shallowed error in create application #71

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/application_msgraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (c AppClient) createApplicationResponder(resp *http.Response) (result Appli
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return result, nil
return result, err
Comment on lines 294 to +295
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should change the return values to be unnamed so that it forces us to use it. The compiler would catch this as "err declared but not used".

var result ApplicationResult
...
if err != nil {
	result.Response = autorest.Response{Response: resp}
	return result, err
}
return result, nil

}

func (c AppClient) deleteApplicationPreparer(ctx context.Context, applicationObjectID string) (*http.Request, error) {
Expand Down