feat: initial commit

This commit is contained in:
2026-04-16 19:39:02 +02:00
commit 50d1686b1e
44 changed files with 2089 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
package apperror
import "errors"
type AppError struct {
Code string
Message string
}
func (e *AppError) Error() string {
return e.Message
}
var (
ErrMessageEmpty = &AppError{Code: "MSG_EMPTY", Message: "message text is empty"}
ErrRouteNotFound = &AppError{Code: "ROUTE_NOT_FOUND", Message: "no route found for message"}
ErrWorkflowTimeout = &AppError{Code: "WORKFLOW_TIMEOUT", Message: "workflow call timed out"}
ErrTranscriptionFailed = &AppError{Code: "TRANSCRIPTION_FAILED", Message: "voice transcription failed"}
ErrSessionNotFound = &AppError{Code: "SESSION_NOT_FOUND", Message: "session not found"}
ErrDownloadFailed = &AppError{Code: "DOWNLOAD_FAILED", Message: "file download failed"}
)
func Is(err, target error) bool {
return errors.Is(err, target)
}