Closed Bug 1553317 Opened 5 months ago Closed 5 months ago

Improve error message on missing method implementation

Categories

(Remote Protocol :: Agent, enhancement, P1)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ato, Assigned: ato)

References

Details

Attachments

(1 file)

We fail with this rather omnious message when we haven’t implemented a CDP method:

Error: Protocol error (Target.createBrowserContext): TypeError: inst[command] is not a function:

We should improve that so debugging the code isn’t necessary.

Assignee: nobody → ato
Blocks: 1540655
Status: NEW → ASSIGNED
Priority: -- → P1

We return with this rather omnious message when we are missing the
implementation of a CDP method:

Error: Protocol error (Target.createBrowserContext): TypeError: inst[command] is not a function:

This patch improves the error message so that debugging is not
necessary to find out which domain or command is missing.

Ideally Session.jsm and ContentProcessSession.jsm would share the
same execute() function (there's really not reason they don't),
but that involves more work.

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3d44dbce7e3
remote: improve error message on missing method; r=remote-protocol-reviewers,ochameau

Pretty sure this is an intermittent. Retriggering to find out.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/34cc442a91cb
remote: improve error message on missing method; r=remote-protocol-reviewers,ochameau CLOSED TREE

:ato we've re-landed your patch. Sorry.

Flags: needinfo?(ato)
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED

Oh I didn’t expect the follow up service of re-landing it for me here, but thanks!

You need to log in before you can comment on or make changes to this bug.