@@ -143,6 +143,7 @@ public function create(string $name, bool $personal = false, bool $local = false
143143
144144 return new DataResponse ($ this ->serializeArray ($ circle ));
145145 } catch (Exception $ e ) {
146+ $ this ->e ($ e , ['name ' => $ name , 'members ' => $ personal , 'local ' => $ local ]);
146147 throw new OcsException ($ e ->getMessage (), $ e ->getCode ());
147148 }
148149 }
@@ -163,6 +164,7 @@ public function destroy(string $circleId): DataResponse {
163164
164165 return new DataResponse ($ this ->serializeArray ($ circle ));
165166 } catch (Exception $ e ) {
167+ $ this ->e ($ e , ['circleId ' => $ circleId ]);
166168 throw new OcsException ($ e ->getMessage (), $ e ->getCode ());
167169 }
168170 }
@@ -182,6 +184,7 @@ public function search(string $term): DataResponse {
182184
183185 return new DataResponse ($ this ->serializeArray ($ this ->searchService ->search ($ term )));
184186 } catch (Exception $ e ) {
187+ $ this ->e ($ e , ['term ' => $ term ]);
185188 throw new OcsException ($ e ->getMessage (), $ e ->getCode ());
186189 }
187190 }
@@ -201,6 +204,7 @@ public function circleDetails(string $circleId): DataResponse {
201204
202205 return new DataResponse ($ this ->serialize ($ this ->circleService ->getCircle ($ circleId )));
203206 } catch (Exception $ e ) {
207+ $ this ->e ($ e , ['circleId ' => $ circleId ]);
204208 throw new OcsException ($ e ->getMessage (), $ e ->getCode ());
205209 }
206210 }
@@ -235,6 +239,7 @@ public function memberAdd(string $circleId, string $userId, int $type): DataResp
235239
236240 return new DataResponse ($ this ->serializeArray ($ result ));
237241 } catch (Exception $ e ) {
242+ $ this ->e ($ e , ['circleId ' => $ circleId , 'userId ' => $ userId , 'type ' => $ type ]);
238243 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
239244 }
240245 }
@@ -266,6 +271,7 @@ public function membersAdd(string $circleId, array $members): DataResponse {
266271
267272 return new DataResponse ($ this ->serializeArray ($ result ));
268273 } catch (Exception $ e ) {
274+ $ this ->e ($ e , ['circleId ' => $ circleId , 'members ' => $ members ]);
269275 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
270276 }
271277
@@ -283,10 +289,12 @@ public function membersAdd(string $circleId, array $members): DataResponse {
283289 public function circleJoin (string $ circleId ): DataResponse {
284290 try {
285291 $ this ->setCurrentFederatedUser ();
292+ \OC ::$ server ->getLogger ()->log (3 , '--- ' . json_encode ($ circleId ));
286293 $ result = $ this ->circleService ->circleJoin ($ circleId );
287294
288295 return new DataResponse ($ this ->serializeArray ($ result ));
289296 } catch (Exception $ e ) {
297+ $ this ->e ($ e , ['circleId ' => $ circleId ]);
290298 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
291299 }
292300 }
@@ -307,6 +315,7 @@ public function circleLeave(string $circleId): DataResponse {
307315
308316 return new DataResponse ($ this ->serializeArray ($ result ));
309317 } catch (Exception $ e ) {
318+ $ this ->e ($ e , ['circleId ' => $ circleId ]);
310319 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
311320 }
312321 }
@@ -336,6 +345,7 @@ public function memberLevel(string $circleId, string $memberId, $level): DataRes
336345
337346 return new DataResponse ($ this ->serializeArray ($ result ));
338347 } catch (Exception $ e ) {
348+ $ this ->e ($ e , ['circleId ' => $ circleId , 'memberId ' => $ memberId , 'level ' => $ level ]);
339349 throw new OcsException ($ e ->getMessage (), $ e ->getCode ());
340350 }
341351 }
@@ -362,6 +372,7 @@ public function memberConfirm(string $circleId, string $memberId): DataResponse
362372
363373 return new DataResponse ($ this ->serializeArray ($ result ));
364374 } catch (Exception $ e ) {
375+ $ this ->e ($ e , ['circleId ' => $ circleId , 'memberId ' => $ memberId ]);
365376 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
366377 }
367378 }
@@ -385,6 +396,7 @@ public function memberRemove(string $circleId, string $memberId): DataResponse {
385396
386397 return new DataResponse ($ this ->serializeArray ($ result ));
387398 } catch (Exception $ e ) {
399+ $ this ->e ($ e , ['circleId ' => $ circleId , 'memberId ' => $ memberId ]);
388400 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
389401 }
390402 }
@@ -402,6 +414,7 @@ public function circles(): DataResponse {
402414
403415 return new DataResponse ($ this ->serializeArray ($ this ->circleService ->getCircles ()));
404416 } catch (Exception $ e ) {
417+ $ this ->e ($ e );
405418 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
406419 }
407420 }
@@ -421,6 +434,7 @@ public function members(string $circleId): DataResponse {
421434
422435 return new DataResponse ($ this ->serializeArray ($ this ->memberService ->getMembers ($ circleId )));
423436 } catch (Exception $ e ) {
437+ $ this ->e ($ e , ['circleId ' => $ circleId ]);
424438 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
425439 }
426440 }
@@ -443,6 +457,7 @@ public function editName(string $circleId, string $value): DataResponse {
443457
444458 return new DataResponse ($ this ->serializeArray ($ outcome ));
445459 } catch (Exception $ e ) {
460+ $ this ->e ($ e , ['circleId ' => $ circleId , 'value ' => $ value ]);
446461 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
447462 }
448463 }
@@ -465,6 +480,7 @@ public function editDescription(string $circleId, string $value): DataResponse {
465480
466481 return new DataResponse ($ this ->serializeArray ($ outcome ));
467482 } catch (Exception $ e ) {
483+ $ this ->e ($ e , ['circleId ' => $ circleId , 'value ' => $ value ]);
468484 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
469485 }
470486 }
@@ -487,6 +503,7 @@ public function editSettings(string $circleId, array $value): DataResponse {
487503
488504 return new DataResponse ($ this ->serializeArray ($ outcome ));
489505 } catch (Exception $ e ) {
506+ $ this ->e ($ e , ['circleId ' => $ circleId , 'value ' => $ value ]);
490507 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
491508 }
492509 }
@@ -509,6 +526,7 @@ public function editConfig(string $circleId, int $value): DataResponse {
509526
510527 return new DataResponse ($ this ->serializeArray ($ outcome ));
511528 } catch (Exception $ e ) {
529+ $ this ->e ($ e , ['circleId ' => $ circleId , 'value ' => $ value ]);
512530 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
513531 }
514532 }
@@ -530,6 +548,7 @@ public function link(string $circleId, string $singleId): DataResponse {
530548
531549 return new DataResponse ($ this ->serialize ($ membership ));
532550 } catch (Exception $ e ) {
551+ $ this ->e ($ e , ['circleId ' => $ circleId , 'singleId ' => $ singleId ]);
533552 throw new OCSException ($ e ->getMessage (), $ e ->getCode ());
534553 }
535554 }
0 commit comments