Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[cli] better build errors #1928

Merged
merged 1 commit into from
Apr 25, 2020
Merged

[cli] better build errors #1928

merged 1 commit into from
Apr 25, 2020

Conversation

quinlanj
Copy link
Member

@quinlanj quinlanj commented Apr 19, 2020

based on weekend slack chat https://expo-developers.slack.com/archives/C04Q3JTSV/p1587257406295000?thread_ts=1586737385.022700&cid=C04Q3JTSV

why

  • throw credentials errors in catch block so we dont continue if there is a fatal error
  • Add context specific failures (ie) user knows they failed to setup a particular credential at a certain step

context specific failures: before

Screen Shot 2020-04-23 at 2 26 40 PM

context specific failures: after

Screen Shot 2020-04-23 at 2 26 04 PM

);
}
} catch (e) {
log.error('Failed to set up Push Key');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there any more context that we can provide in this error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more context-specific error with the expo.fyi link is caught and rethrown (which will then print to stderr). I catch it at this point and print out Failed to set up Push Key so we know which part of the credential process we failed at. The error logging would look something like this:

Failed to set up Push Key
Additional information needed to setup credentials in non-interactive mode.
Learn more about how to resolve this: expo.fyi/credentials-non-interactive (​https://expo.fyi/credentials-non-interactive​).

);
}
} catch (e) {
log.error('Failed to set up Provisioning Profile');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to above, is there any more context we can provide here? maybe a expo.fyi link that explains why this can happen, for example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above comment :)

@quinlanj quinlanj merged commit e070f0a into master Apr 25, 2020
@quinlanj quinlanj deleted the @quin/betterBuildErrors branch April 25, 2020 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants