mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 03:14:06 -05:00
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
420 B
Go
23 lines
420 B
Go
package api
|
|
|
|
import "fmt"
|
|
|
|
// OnyxAPIError is returned when an Onyx API call fails.
|
|
type OnyxAPIError struct {
|
|
StatusCode int
|
|
Detail string
|
|
}
|
|
|
|
func (e *OnyxAPIError) Error() string {
|
|
return fmt.Sprintf("HTTP %d: %s", e.StatusCode, e.Detail)
|
|
}
|
|
|
|
// AuthError is returned when authentication or authorization fails.
|
|
type AuthError struct {
|
|
Message string
|
|
}
|
|
|
|
func (e *AuthError) Error() string {
|
|
return e.Message
|
|
}
|