fix(core): updated error reporting url

This commit is contained in:
alina 🌸 2024-10-02 02:41:08 +03:00
parent 7235240bac
commit ecddcad012
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -5,10 +5,10 @@ import type { Logger } from './logger.js'
export function reportUnknownError(log: Logger, error: tl.RpcError, method: string): void {
if (typeof fetch !== 'function') return
fetch(`https://rpc.pwrtelegram.xyz/?code=${error.code}&method=${method}&error=${error.text}`)
fetch(`https://report-rpc-error.madelineproto.xyz/?code=${error.code}&method=${method}&error=${error.text}`)
.then(r => r.json())
.then((r) => {
if (r.ok) {
if (r.result) {
log.info('telerpc responded with error info for %s: %s', error.text, r.result)
} else {
log.info(