1
0
Fork 0
mirror of synced 2024-08-20 20:51:40 +12:00

implement error msg

This commit is contained in:
Everly Precia Suresh 2022-10-25 17:46:28 +00:00
parent 17251b1973
commit de7fee6790

View file

@ -96,10 +96,10 @@ class DatabaseV1 extends Worker
throw new Exception('Failed to create Attribute'); throw new Exception('Failed to create Attribute');
} }
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available')); $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'available'));
// $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('error', 'available'));
} catch (\Throwable $th) { } catch (\Throwable $th) {
Console::error($th->getMessage()); Console::error($th->getMessage());
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed')); $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'failed'));
$dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('error', $th->getMessage()));
} finally { } finally {
$target = Realtime::fromPayload( $target = Realtime::fromPayload(
// Pass first, most verbose event pattern // Pass first, most verbose event pattern