mailosaur / mailosaur-node

Mailosaur email and SMS testing library for Node.js

Home Page:https://mailosaur.com/docs/languages/nodejs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Search criteria with Unicode symbol is not recognized (400 error)

studouglas-scx opened this issue · comments

Trying to search with criteria that includes non-ASCII symbols returns a 400 ValidationError with message "Please provide search criteria".

Making the same request directly to the Mailosaur API works fine.

To reproduce:

// throws mailosaurError: { type: 'ValidationError', messages: { criteria: 'Please provide search criteria.' }, model: undefined }
// NOTE: the ellipsis is a single unicode character, not 3 ASCII periods
mailosaurClient.messages.search('SERVER_ID', { subject: 'Subject with ellipsis…' });

// works fine (and returns the email that includes the ellipsis)
mailosaurClient.messages.search('SERVER_ID', { subject: 'Subject with ellipsis' });
commented

Great catch @studouglas-scx! This has now been fixed as part of version 7.0.3, the only other change in v7 is a restructure of the error model. 👍