Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iac): make "Invalid API key" error message consistent with `secre…
…t scan` When calling `ggshield iac scan` with an invalid API key, the error message says: ``` status_code=401 detail=Invalid API key. Usage: ggshield iac scan [OPTIONS] DIRECTORY Try 'ggshield iac scan -h' for help. Error: Invalid API key. ``` This is confusing because the user did not make any error with command-line arguments, so showing the command CLI help is not helpful. Furthermore, the first line is a less human-friendly format of the rest. Rework this to match the error message printed by `secret scan`. Now it only says: ``` Error: Invalid API key. ``` Remove the `logger.error()` call because it duplicates what `display_error()` prints.
- Loading branch information