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: nil deriference #361

Merged
merged 1 commit into from
Jun 4, 2024
Merged

fix: nil deriference #361

merged 1 commit into from
Jun 4, 2024

Conversation

gassara-kys
Copy link
Collaborator

通知先が登録されてないとNil参照エラーで落ちてしまうので修正します

Copy link

github-actions bot commented Jun 4, 2024

PR Analysis

Main theme

Bug fix

PR summary

This PR addresses an issue where an error is returned when no notifications are found, providing a more specific error message.

Type of PR

Bug fix

PR Feedback:

General suggestions

Consider adding a check for nil notifications along with an empty notifications slice to handle both cases separately for clarity and to differentiate between missing notifications and an empty list.

Code feedback

relevant file:

pkg/server/alert/alert_notification.go

suggestion:

Consider adding a check to handle nil notifications and an empty slice separately for clear distinction.

relevant line:

+	if notifications == nil || len(*notifications) == 0 {

Security concerns:

no

Copy link

github-actions bot commented Jun 4, 2024

セキュリティレビューを実施しました。
特に問題は見つかりませんでした👏

By RISKEN review

Copy link
Contributor

@iiiidaaa iiiidaaa left a comment

Choose a reason for hiding this comment

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

LGTM

@gassara-kys gassara-kys merged commit 685857a into master Jun 4, 2024
5 checks passed
@gassara-kys gassara-kys deleted the fix-bug branch June 4, 2024 07:34
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