mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 09:15:19 +00:00
handle jsonld parse errors and send them to the app log instead of the php log.
This commit is contained in:
parent
b195407028
commit
06a674775e
1 changed files with 9 additions and 1 deletions
|
@ -89,7 +89,15 @@ class LDSignatures {
|
|||
|
||||
jsonld_set_document_loader('jsonld_document_loader');
|
||||
|
||||
return jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]);
|
||||
try {
|
||||
$d = jsonld_normalize($data,[ 'algorithm' => 'URDNA2015', 'format' => 'application/nquads' ]);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
logger('normalise error:' . print_r($e,true));
|
||||
logger('normalise error: ' . print_r($data,true));
|
||||
}
|
||||
|
||||
return $d;
|
||||
}
|
||||
|
||||
static function salmon_sign($data,$channel) {
|
||||
|
|
Loading…
Reference in a new issue