feat(net-events): Initial opinionated promise wrapper around net events

Lets see how I & the rest of the team feel about this specific standard and we can tweak it from there.
This commit is contained in:
Taso committed 2021-04-19 14:14:25 -04:00
1 parent f8f722c8d2
commit 25a629a59b
7 files changed
+165 -6

No files matched your search

@@ -35,7 +35,7 @@ class _ContactService {
this.responseBuilder(src, {
action: ContactEvents.UPDATE_CONTACT,
error: {
errorKey: ErrorStringKeys.UPDATE_FAILED,
errorCode: ErrorStringKeys.UPDATE_FAILED,
message: `Failed to update contact ${contact.id}`,
},
});
@@ -52,7 +52,7 @@ class _ContactService {
this.responseBuilder(src, {
action: ContactEvents.DELETE_CONTACT,
error: {
errorKey: ErrorStringKeys.DELETE_FAILED,
errorCode: ErrorStringKeys.DELETE_FAILED,
message: `Failed to delete contactId ${contactId}`,
},
});
@@ -72,7 +72,7 @@ class _ContactService {
this.responseBuilder(src, {
action: ContactEvents.ADD_CONTACT,
error: {
errorKey: ErrorStringKeys.ADD_FAILED,
errorCode: ErrorStringKeys.ADD_FAILED,
message: 'Unable to add contacts',
},
});
@@ -92,7 +92,7 @@ class _ContactService {
this.responseBuilder(src, {
action: ContactEvents.SEND_CONTACTS,
error: {
errorKey: ErrorStringKeys.SERVER_ERROR,
errorCode: ErrorStringKeys.SERVER_ERROR,
message: 'Unable to fetch contacts',
},
});