Skip to content

1.7.0 doesn't print server status and error messages #116

@remip2

Description

@remip2
$ osc-cli api ReadImages --Filters '{ERROR}' --profile cloudgouv-eu-west-1
Traceback (most recent call last):
  File "/home/remip/.local/bin/osc-cli", line 8, in <module>
    sys.exit(main())
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 693, in main
    fire.Fire(api_connect)
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 365, in _Fire
    component, consumed_args, remaining_args, capacity = _CallCallable(
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 686, in api_connect
    handler.make_request(call, **kwargs)
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 512, in make_request
    self.response = self.get_response(
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 458, in get_response
    raise OscApiException(http_response)
  File "<string>", line 4, in __init__
TypeError: __post_init__() missing 1 required positional argument: 'http_response'

The server status and error message is not printed anymore.

with 1.6 :

$ osc-cli api ReadImages --Filters '{ERROR}' --profile cloudgouv-eu-west-1
Traceback (most recent call last):
  File "/home/remip/.local/bin/osc-cli", line 8, in <module>
    sys.exit(main())
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 557, in main
    fire.Fire(api_connect)
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 365, in _Fire
    component, consumed_args, remaining_args, capacity = _CallCallable(
  File "/home/remip/.local/lib/python3.8/site-packages/fire/core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 550, in api_connect
    handler.make_request(call, *args, **kwargs)
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 391, in make_request
    self.response = self.get_response(
  File "/home/remip/.local/lib/python3.8/site-packages/osc_sdk/sdk.py", line 340, in get_response
    raise OscApiException(http_response)
osc_sdk.sdk.OscApiException: Error --> status = 400, code = 4110, Reason = InvalidParameterValue, request_id = 05919725-e029-466e-9973-28c83bef4cd7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions