improve debug and error controlling on explorer
This commit is contained in:
parent
aa49e97075
commit
f38b6c482f
@ -60,7 +60,7 @@ class Activitypub_explorer
|
|||||||
$actor_profile = $discovery->lookup($url);
|
$actor_profile = $discovery->lookup($url);
|
||||||
return $actor_profile[0];
|
return $actor_profile[0];
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new Exception('Invalid Actor.');
|
throw new Exception('Invalid Actor: '.$e->getMessage());
|
||||||
}
|
}
|
||||||
unset($discovery);
|
unset($discovery);
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ class Activitypub_explorer
|
|||||||
public function lookup($url)
|
public function lookup($url)
|
||||||
{
|
{
|
||||||
if (in_array($url, ACTIVITYPUB_PUBLIC_TO)) {
|
if (in_array($url, ACTIVITYPUB_PUBLIC_TO)) {
|
||||||
return [];
|
throw new Exception ('Empty Actor URL.');
|
||||||
}
|
}
|
||||||
|
|
||||||
common_debug('ActivityPub Explorer: Started now looking for '.$url);
|
common_debug('ActivityPub Explorer: Started now looking for '.$url);
|
||||||
|
Reference in New Issue
Block a user