✨ Update dependencies, enhance NATS consumer configuration, and improve error handling in message processing. Introduce telemetry support with OpenTelemetry for tracing and metrics. Refactor README to include new configuration options and update tests for improved coverage of error scenarios.
This commit is contained in:
@@ -14,8 +14,7 @@ func NewAviationParser() *AviationParser {
|
||||
}
|
||||
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
func (p *AviationParser) Parse(rawText string) *domain.ParsedMessage {
|
||||
func (p *AviationParser) Parse(rawText string) (*domain.ParsedMessage, error) {
|
||||
// Use the existing Parse function from internal/parsers
|
||||
return parsers.Parse(rawText)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,5 @@ import "caatsm/internal/domain"
|
||||
// Parser defines the interface for parsing raw telegram messages
|
||||
type Parser interface {
|
||||
// Parse parses a raw message string and returns a ParsedMessage
|
||||
Parse(rawText string) *domain.ParsedMessage
|
||||
|
||||
// TODO: consider returning (*domain.ParsedMessage, error) to surface parse failures explicitly.
|
||||
Parse(rawText string) (*domain.ParsedMessage, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user