Add comment about error handling

Summary:
Added some notes to T55169042.

Also limited the acceptable result types.

Reviewed By: jknoxville

Differential Revision: D17787130

fbshipit-source-id: 19cefdde5ab195080281e9f2e26f5a236dd59629
This commit is contained in:
Pascal Hartig
2019-10-08 00:17:23 -07:00
committed by Facebook Github Bot
parent ca8df6d680
commit 4d1e7dc80f

View File

@@ -9,9 +9,7 @@ import {
FlexColumn, FlexColumn,
Button, Button,
styled, styled,
colors,
Text, Text,
LoadingIndicator,
FlexRow, FlexRow,
Spacer, Spacer,
Input, Input,
@@ -44,16 +42,6 @@ const Container = styled(FlexColumn)({
width: 500, width: 500,
}); });
const Center = styled(FlexColumn)({
alignItems: 'center',
paddingTop: 50,
paddingBottom: 50,
});
const Uploading = styled(Text)({
marginTop: 15,
});
const Copy = styled(Input)({ const Copy = styled(Input)({
marginRight: 0, marginRight: 0,
marginBottom: 15, marginBottom: 15,
@@ -84,7 +72,7 @@ type Props = {
type State = { type State = {
runInBackground: boolean; runInBackground: boolean;
errorArray: Array<Error>; errorArray: Array<Error>;
result: DataExportError | DataExportResult | null | undefined; result: DataExportError | DataExportResult | null;
statusUpdate: string | null; statusUpdate: string | null;
}; };
@@ -133,6 +121,8 @@ export default class ShareSheetExportUrl extends Component<Props, State> {
); );
statusUpdate('Uploading Flipper Trace...'); statusUpdate('Uploading Flipper Trace...');
// TODO(T55169042): Implement error handling. Result is not tested
// its result type right now, causing the upload indicator to stall forever.
const result = await reportPlatformFailures( const result = await reportPlatformFailures(
shareFlipperData(serializedString), shareFlipperData(serializedString),
`${SHARE_FLIPPER_TRACE_EVENT}`, `${SHARE_FLIPPER_TRACE_EVENT}`,