broker: fixup error handler func
Some checks failed
coverage / build (push) Failing after 1m54s
sync / sync (push) Failing after 16s
test / test (push) Failing after 18m21s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-12-16 09:01:25 +03:00
parent 46eb739dff
commit 560afc5dd6

View File

@@ -43,7 +43,7 @@ type Options struct {
// ContentType will be used if no content-type set when creating message
ContentType string
// ErrorHandler specifies handler for all broker errors handling subscriber
ErrorHandler any
ErrorHandler func(Message) error
}
// NewOptions create new Options
@@ -90,7 +90,7 @@ func ContentType(ct string) Option {
}
// ErrorHandler handles errors in broker
func ErrorHandler(h any) Option {
func ErrorHandler(h func(Message) error) Option {
return func(o *Options) {
o.ErrorHandler = h
}