mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-02 11:55:53 +02:00
fix backend response error.
This commit is contained in:
parent
b7fb738e3a
commit
a0565dd295
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"m1k1o/neko/internal/api"
|
"m1k1o/neko/internal/api"
|
||||||
oldEvent "m1k1o/neko/internal/http/legacy/event"
|
oldEvent "m1k1o/neko/internal/http/legacy/event"
|
||||||
|
@ -158,7 +159,7 @@ func (h *LegacyHandler) Route(r types.Router) {
|
||||||
s.toClient(&oldMessage.SystemMessage{
|
s.toClient(&oldMessage.SystemMessage{
|
||||||
Event: oldEvent.SYSTEM_ERROR,
|
Event: oldEvent.SYSTEM_ERROR,
|
||||||
Title: "backend response error",
|
Title: "backend response error",
|
||||||
Message: err.Error(),
|
Message: strings.ReplaceAll(err.Error(), ErrBackendRespone.Error()+": ", ""),
|
||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
} else if errors.Is(err, ErrWebsocketSend) {
|
} else if errors.Is(err, ErrWebsocketSend) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue