Skip to content

Commit

Permalink
[eas-cli] print network error message if present (#2407)
Browse files Browse the repository at this point in the history
* [eas-cli] print network error message if present

* update CHANGELOG.md
szdziedzic authored Jun 5, 2024
1 parent 3093691 commit 3fcbcf5
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Print network error message if present. ([#2407](https://github.com/expo/eas-cli/pull/2407) by [@szdziedzic](https://github.com/szdziedzic))

## [9.1.0](https://github.com/expo/eas-cli/releases/tag/v9.1.0) - 2024-05-23

### 🎉 New features
5 changes: 4 additions & 1 deletion packages/eas-cli/src/commandUtils/EasCommand.ts
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@ export default abstract class EasCommand extends Command {
if (err instanceof EasCommandError) {
Log.error(err.message);
} else if (err instanceof CombinedError && err?.graphQLErrors) {
const cleanMessage = err?.graphQLErrors
const cleanGQLErrorsMessage = err?.graphQLErrors
.map((graphQLError: GraphQLError) => {
const messageLine = graphQLError.message.replace('[GraphQL] ', '');
const requestIdLine = graphQLError.extensions?.requestId
@@ -223,6 +223,9 @@ export default abstract class EasCommand extends Command {
return defaultMsg;
})
.join('\n');
const cleanMessage = err.networkError
? `${cleanGQLErrorsMessage}\n${err.networkError.message}`
: cleanGQLErrorsMessage;
Log.error(cleanMessage);
baseMessage = BASE_GRAPHQL_ERROR_MESSAGE;
} else {

0 comments on commit 3fcbcf5

Please sign in to comment.