-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update "no service found to link..." error
This updates the error message that occurs when a config.service.name is required in order to execute a command. Before this commit, there were two distinct messages that were used in commands to communicate this error to the user, which were slightly different in their wording. This updates the wording to provide an explanation as well as next steps on how to remedy the issue. Additionally, it uses the `CLIError` class in order to print out an error in a "friendly" way without a stack trace, as recommended by the @oclif/errors package we are using: https://oclif.io/docs/commands#thiserrormessage-string--error-options-code-string-exit-number
- Loading branch information
Adam Zionts
committed
Mar 25, 2020
1 parent
a0d2c1d
commit a65872f
Showing
7 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { CLIError } from "@oclif/errors"; | ||
|
||
const errorMessage = [ | ||
"No graph (i.e. service) found to link to Apollo Graph Manager.", | ||
"In order to run this command, please provide a graph ID using the 'apollo.config.js' file.", | ||
"\n\nFor more information on configuring the Apollo CLI, please go to", | ||
"https://www.apollographql.com/docs/devtools/apollo-config/" | ||
].join(" "); | ||
export const graphUndefinedError = new CLIError(errorMessage); |