Files
ttstd-infinite-canvas/backend/internal/outbound/errors.go

19 lines
420 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package outbound
// BadRequestError 是出站校验失败(URL/Header 等)的稳定错误类型。
// service 层通过 aliases 转成 AppError,避免 outbound → service 回环。
type BadRequestError struct {
Message string
}
func (e *BadRequestError) Error() string {
if e == nil {
return ""
}
return e.Message
}
func BadAuthRequest(message string) error {
return &BadRequestError{Message: message}
}