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

MG-2059 - Set correct log level depending on error #2196

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
linted code
Signed-off-by: nyagamunene <[email protected]>
nyagamunene committed Jun 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit bf977ec641ff723425607edfcde96dbc5d2a5a39
2 changes: 1 addition & 1 deletion pkg/errors/types.go
Original file line number Diff line number Diff line change
@@ -80,4 +80,4 @@ func (rte *RollbackTxError) Error() string {

var ErrRollbackTx = &RollbackTxError{
Err: New("failed to rollback transaction"),
}
}

Unchanged files with check annotations Beta

}
if obs == startObserve {
c := coap.NewClient(w.Conn(), m.Token(), logger)
w.Conn().AddOnClose(func() {

Check failure on line 134 in coap/api/transport.go

GitHub Actions / Lint and Build

Function `handleGet$1` should pass the context parameter (contextcheck)
err := service.Unsubscribe(context.Background(), key, msg.GetChannel(), msg.GetSubtopic(), c.Token())
args := []any{
slog.String("channel_id", msg.GetChannel()),
}
logger.Warn("Unsubscribe idle client completed successfully", args...)
})
return service.Subscribe(w.Conn().Context(), key, msg.GetChannel(), msg.GetSubtopic(), c)

Check failure on line 148 in coap/api/transport.go

GitHub Actions / Lint and Build

Non-inherited new context, use function like `context.WithXXX` instead (contextcheck)
}
return service.Unsubscribe(w.Conn().Context(), key, msg.GetChannel(), msg.GetSubtopic(), m.Token().String())

Check failure on line 150 in coap/api/transport.go

GitHub Actions / Lint and Build

Non-inherited new context, use function like `context.WithXXX` instead (contextcheck)
}
func decodeMessage(msg *mux.Message) (*messaging.Message, error) {