Fix CRASH: undefined undefined bug

Summary:
Display "crashes" as plugin errors when they don't include the expected crash attributes.

Plugins can respond to a `call()` with success or error. If error, then they can provide an arbitrary json object.
These errors go through the same code as crash reports for the crash reporter plugin, but they don't necessarily contain the expected attributes.

When they don't display them as a plugin error, and stringify the whole object.

It would be better to distinguish these properly and highlight that they aren't crashes, in the crash reporter, but that's a bigger task. This stops them being shown as "undefined undefined".

Reviewed By: xiphirx

Differential Revision: D14207907

fbshipit-source-id: 8ba357fbe681a40cd671510a187073e4cbfa2184
This commit is contained in:
John Knox
2019-02-25 09:28:31 -08:00
committed by Facebook Github Bot
parent f1d46caa2f
commit f12144be38
2 changed files with 14 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ import {
Link,
Glyph,
DetailSidebar,
SidebarExtensions,
} from 'flipper';
import Inspector from './Inspector';
import ToolbarIcon from './ToolbarIcon';
@@ -193,6 +194,7 @@ export default class Layout extends FlipperPlugin<State, void, PersistedState> {
element={element}
onValueChanged={this.onDataValueChanged}
logger={this.props.logger}
extensions={SidebarExtensions}
/>
</DetailSidebar>
</>