Add custom notFoundError type and improve error handling

Introduce the notFoundError struct to provide more detailed error messages for missing handlers like alarms, JSON operations, and payload types. Update error handling to leverage the new custom type and use errors.As for better flexibility. Additionally, update module imports to version v2 in relevant files.
This commit is contained in:
2025-02-23 11:51:16 +03:00
parent 58b1c67b97
commit 7c348629d6
3 changed files with 26 additions and 8 deletions

View File

@ -3,7 +3,7 @@ package main
import (
"errors"
"fmt"
"gitea.unprism.ru/KRBL/n9m"
"gitea.unprism.ru/KRBL/n9m/v2"
"io"
"net"
"os"