Skip to content

Commit e841abb

Browse files
committed
Fixed type; added ValidationError
1 parent da874f6 commit e841abb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ interface TransactionalEmail {
179179
* The date the email was last updated in ECMA-262 date-time format.
180180
* @see https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-time-string-format
181181
*/
182-
lastUpdate: string;
182+
lastUpdated: string;
183183
/**
184184
* Data variables in the transactional email.
185185
*/
@@ -546,7 +546,9 @@ class LoopsClient {
546546
mailingLists?: MailingLists;
547547
}): Promise<EventSuccessResponse> {
548548
if (!userId && !email)
549-
throw "You must provide an `email` or `userId` value.";
549+
throw new ValidationError(
550+
"You must provide an `email` or `userId` value."
551+
);
550552
const payload: {
551553
email?: string;
552554
userId?: string;

0 commit comments

Comments
 (0)