Skip to content

Commit

Permalink
better error message (ampproject#8913)
Browse files Browse the repository at this point in the history
* better error message

* error
  • Loading branch information
chenshay authored and Eric Kenney committed May 3, 2017
1 parent ea211cb commit 68c86b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions/amp-viewer-integration/0.1/messaging.js
Expand Up @@ -274,8 +274,10 @@ export class Messaging {
handler = this.defaultHandler_;
}
if (!handler) {
throw new Error(
const error = new Error(
'Cannot handle request because handshake is not yet confirmed!');
error.args = message.name;
throw error;
}

const promise = handler(message.name, message.data, !!message.rsvp);
Expand Down

0 comments on commit 68c86b1

Please sign in to comment.