package routers import "errors" // Common errors var ( // ErrRoutesCompilationErrors indicates that some routes failed to compile // but the router is still operational ErrRoutesCompilationErrors = errors.New("some routes failed to compile") ) // RouteError represents an error with a specific route type RouteError struct { Path string // The URL path Method string // HTTP method ScriptPath string // Path to the Lua script Err error // The actual error } // Error returns the error message func (re *RouteError) Error() string { if re.Err == nil { return "unknown route error" } return re.Err.Error() }