Skip to content

Commit

Permalink
Show criteria upon search timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed Jun 12, 2024
1 parent c8b73e0 commit f433ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mailosaurCommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class MailosaurCommands {
if (((Date.now() - startTime) + delay) > options.timeout) {
return (options.errorOnTimeout === false)
? resolve(body)
: reject(new Error('No matching messages found in time. By default, only messages received in the last hour are checked (use receivedAfter to override this).'));
: reject(new Error(`No matching messages found in time. By default, only messages received in the last hour are checked (use receivedAfter to override this). The search criteria used for this query was [${JSON.stringify(searchCriteria)}] which timed out after ${options.timeout}ms`));
}

return setTimeout(fn(resolve, reject), delay);
Expand Down

0 comments on commit f433ef8

Please sign in to comment.