Skip to content

Only return exit code 0 on successful case import #138

@Nicolai-vKuegelgen

Description

@Nicolai-vKuegelgen

Describe the bug
When using varfish-cli importer caseimportinfo-create the exit code can be 0 even if the case import did not work as is apparent from the log files (including. i.e. status code 404 from the API).
This makes it very difficult to automate the upload workflow, since one needs to parse the log files in order to see if the upload was successful.

To Reproduce
Steps to reproduce the behavior:

  1. Use non-responsive varfish URL
  2. Run varfish-cli importer caseimportinfo-create with otherwise proper intpus
  3. Exit code will be 0
  4. See error in log files

Expected behavior
The case import exit code should only be 0 if the API gives a positive signal.

Additional context
It seems that if the Varfish API actually returns a failure code, then so does varfsih-cli. However, it does not do that if it never gets a proper response from the APi in the first place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions