ax(node): rename msg to errorMessage in NewErrorMessage
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

AX Principle 1: Predictable names over short names.
`msg` is an abbreviation; `errorMessage` names what it is.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 17:55:08 +01:00
parent ba72f3e408
commit aba728ff83
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -255,13 +255,13 @@ const (
// errorMessage, _ := NewErrorMessage(identity.ID, msg.From, ErrCodeOperationFailed, err.Error(), msg.ID)
// conn.Send(errorMessage)
func NewErrorMessage(from, to string, code int, message string, replyTo string) (*Message, error) {
msg, err := NewMessage(MsgError, from, to, ErrorPayload{
errorMessage, err := NewMessage(MsgError, from, to, ErrorPayload{
Code: code,
Message: message,
})
if err != nil {
return nil, err
}
msg.ReplyTo = replyTo
return msg, nil
errorMessage.ReplyTo = replyTo
return errorMessage, nil
}