fix: make discord login work if no user exists
This commit is contained in:
parent
8c187d0fb3
commit
75f628c722
2 changed files with 12 additions and 0 deletions
|
@ -50,6 +50,14 @@ type APIError struct {
|
|||
}
|
||||
|
||||
func (e APIError) Error() string {
|
||||
if e.Message == "" {
|
||||
e.Message = errCodeMessages[e.Code]
|
||||
}
|
||||
|
||||
if e.Details != "" {
|
||||
return fmt.Sprintf("%s (code: %d) (%s)", e.Message, e.Code, e.Details)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s (code: %d)", e.Message, e.Code)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue