mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
feat(relay): send custom error messages - since, until & kind
This commit is contained in:
parent
c7092f5d2d
commit
a7f2fb06ee
1 changed files with 4 additions and 1 deletions
|
|
@ -77,7 +77,10 @@ function connectStream(socket: WebSocket) {
|
|||
send(['EVENT', subId, event]);
|
||||
}
|
||||
} catch (e) {
|
||||
if (e instanceof RelayError) {
|
||||
if (
|
||||
e instanceof RelayError ||
|
||||
e.message.slice(-('filter too far into the future'.length)) === 'filter too far into the future'
|
||||
) {
|
||||
send(['CLOSED', subId, e.message]);
|
||||
} else {
|
||||
send(['CLOSED', subId, 'error: something went wrong']);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue