Merge pull request #539 from nextcloud/more-logs-2

more logs
pull/545/head
Maxence Lange 2019-05-27 01:52:04 -01:00 zatwierdzone przez GitHub
commit 07dcffca3c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 7 dodań i 8 usunięć

Wyświetl plik

@ -242,7 +242,7 @@ class CacheActorsRequest extends CacheActorsRequestBuilder {
$cursor->closeCursor();
if ($data === false) {
throw new CacheActorDoesNotExistException();
throw new CacheActorDoesNotExistException('Unknown account \'' . $account . "'");
}
return $this->parseCacheActorsSelectSql($data);

Wyświetl plik

@ -133,7 +133,9 @@ class StreamRequest extends StreamRequestBuilder {
$cursor->closeCursor();
if ($data === false) {
throw new StreamNotFoundException('Stream not found');
throw new StreamNotFoundException(
'Stream (ById) not found - ' . $id . ' (asViewer: ' . $asViewer . ')'
);
}
try {
@ -166,7 +168,7 @@ class StreamRequest extends StreamRequestBuilder {
$cursor->closeCursor();
if ($data === false) {
throw new StreamNotFoundException('Stream not found');
throw new StreamNotFoundException('Stream (ByActivityId) not found - ' . $id);
}
return $this->parseStreamSelectSql($data);

Wyświetl plik

@ -35,7 +35,6 @@ use Doctrine\DBAL\Query\QueryBuilder;
use OCA\Social\Exceptions\InvalidResourceException;
use OCA\Social\Model\ActivityPub\ACore;
use OCA\Social\Model\ActivityPub\Actor\Person;
use OCA\Social\Model\ActivityPub\Object\Note;
use OCA\Social\Model\ActivityPub\Stream;
use OCA\Social\Model\InstancePath;
use OCP\DB\QueryBuilder\ICompositeExpression;
@ -113,8 +112,6 @@ class StreamRequestBuilder extends CoreRequestBuilder {
$qb->selectAlias($qb->createFunction('COUNT(*)'), 'count')
->from(self::TABLE_STREAMS, 's');
$this->limitToType($qb, Note::TYPE);
$this->defaultSelectAlias = 's';
return $qb;

Wyświetl plik

@ -54,17 +54,17 @@ if ($type !== 'acct') {
list($username, $instance) = explode('@', $account);
try {
$cacheActorService = OC::$server->query(CacheActorService::class);
$configService = OC::$server->query(ConfigService::class);
if ($configService->getCloudAddress(true) !== $instance) {
throw new Exception();
throw new Exception('instance is ' . $instance . ', expected ' . $configService->getCloudAddress(true));
}
$cacheActorService->getFromLocalAccount($username);
} catch (Exception $e) {
OC::$server->getLogger()->log(1, 'Exception on webfinger - ' . $e->getMessage());
http_response_code(404);
exit;
}