test: attempt catching error

This commit is contained in:
Mar0xy 2023-09-26 00:48:34 +02:00
parent c9159c7313
commit 77754cc3d8
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828

View File

@ -610,7 +610,7 @@ export default class Misskey implements MegalodonInterface {
max_id?: string max_id?: string
since_id?: string since_id?: string
} }
): Promise<Response<Array<Entity.Account>>> { ): Promise<Response<Array<Entity.Account>> | any> {
let params = { let params = {
query: q, query: q,
detail: true detail: true
@ -631,7 +631,13 @@ export default class Misskey implements MegalodonInterface {
return Object.assign(res, { return Object.assign(res, {
data: res.data.map(u => MisskeyAPI.Converter.userDetail(u, this.baseUrl)) data: res.data.map(u => MisskeyAPI.Converter.userDetail(u, this.baseUrl))
}) })
}) }).catch(() => ({
data: {
accounts: [],
statuses: [],
hashtags: [],
}
}))
} }
// ====================================== // ======================================