Capture errors attempting to call draft.ready() from the unified banner.

Review Request #14012 — Created July 5, 2024 and submitted

Information

Review Board
release-7.x

Reviewers

The unified banner attempts to access the draft via the API for the
draft when its created, in order to start up its draft modes. When the
user does not have access to the draft, this ends up with an error in
the JS console. This error was harmless, but annoying to see when
debugging.

This change adds a catch so we can swalllow any errors when attempting
to call ready on the draft.

Loaded a review request owned by another user and saw that I no longer
got an error in my devtools.

Summary ID
Capture errors attempting to call draft.ready() from the unified banner.
The unified banner attempts to access the draft via the API for the draft when its created, in order to start up its draft modes. When the user does not have access to the draft, this ends up with an error in the JS console. This error was harmless, but annoying to see when debugging. This change adds a catch so we can swalllow any errors when attempting to call ready on the draft. Testing Done: Loaded a review request owned by another user and saw that I no longer got an error in my devtools.
f6bb4ef82811e3569182433aae32330e265663b8
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-7.x (b445730)