1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-20 16:25:36 +02:00

WebFingerリクエストで Proxy, Keep-Alive などをサポート (#4658)

* no webfinger.js

* Fix: エラーメッセージがくどい
This commit is contained in:
MeiMei
2019-04-10 12:28:59 +09:00
committed by syuilo
parent 83b7010d6a
commit 03a3c56a54
4 changed files with 34 additions and 78 deletions

View File

@@ -79,8 +79,8 @@ export default async (username: string, _host: string, option?: any, resync?: bo
async function resolveSelf(acctLower: string) {
logger.info(`WebFinger for ${chalk.yellow(acctLower)}`);
const finger = await webFinger(acctLower).catch(e => {
logger.error(`Failed to WebFinger for ${chalk.yellow(acctLower)}: ${e.message} (${e.status})`);
throw e;
logger.error(`Failed to WebFinger for ${chalk.yellow(acctLower)}: ${ e.statusCode || e.message }`);
throw new Error(`Failed to WebFinger for ${acctLower}: ${ e.statusCode || e.message }`);
});
const self = finger.links.find(link => link.rel && link.rel.toLowerCase() === 'self');
if (!self) {