mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 14:05:14 +00:00
test: attempt catching error
This commit is contained in:
parent
c9159c7313
commit
77754cc3d8
1 changed files with 8 additions and 2 deletions
|
@ -610,7 +610,7 @@ export default class Misskey implements MegalodonInterface {
|
|||
max_id?: string
|
||||
since_id?: string
|
||||
}
|
||||
): Promise<Response<Array<Entity.Account>>> {
|
||||
): Promise<Response<Array<Entity.Account>> | any> {
|
||||
let params = {
|
||||
query: q,
|
||||
detail: true
|
||||
|
@ -631,7 +631,13 @@ export default class Misskey implements MegalodonInterface {
|
|||
return Object.assign(res, {
|
||||
data: res.data.map(u => MisskeyAPI.Converter.userDetail(u, this.baseUrl))
|
||||
})
|
||||
})
|
||||
}).catch(() => ({
|
||||
data: {
|
||||
accounts: [],
|
||||
statuses: [],
|
||||
hashtags: [],
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
// ======================================
|
||||
|
|
Loading…
Reference in a new issue