Skip to content

Instantly share code, notes, and snippets.

@supermacro
Created September 12, 2024 14:16
Show Gist options
  • Save supermacro/692e80892c75c6b6644f403cf5018e10 to your computer and use it in GitHub Desktop.
Save supermacro/692e80892c75c6b6644f403cf5018e10 to your computer and use it in GitHub Desktop.
const result = await this.getNotification(notificationId, clientId)
.andThen((notification) => this.executeSms(notification).map(() => notification))
.andThen((notification) => this.saveAndPublish(notification))
if (result.isOk()) {
return result.value
}
throw new Error(result.error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment