test: attempt catching error
This commit is contained in:
parent
c9159c7313
commit
77754cc3d8
@ -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: [],
|
||||||
|
}
|
||||||
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================================
|
// ======================================
|
||||||
|
Loading…
Reference in New Issue
Block a user