Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing ErrorMessage, ResponseError and description in K8s status #210

Open
sonman opened this issue Apr 22, 2022 · 1 comment
Open

Missing ErrorMessage, ResponseError and description in K8s status #210

sonman opened this issue Apr 22, 2022 · 1 comment

Comments

@sonman
Copy link

sonman commented Apr 22, 2022

Describe the bug
When raising a ErrBadRequest Exception with Message "Some Message" within a provisioning kubernetes will not show the Message "Some Message". Also ErrorMessage and ResponseError is "< nil >".

Example:

conditions:
  - lastTransitionTime: "2022-04-22T09:06:57Z"
    message: 'Error provisioning ServiceInstance of ServiceClass (K8S: "space1/s3"
      ExternalName: "space1/s3") at ClusterServiceBroker "s3-broker":
      Status: 400; ErrorMessage: <nil>; Description: The request data is invalid.;
      ResponseError: <nil>'
    reason: ProvisionCallFailed
    status: "False"
    type: Ready
...

To Reproduce
Steps to reproduce the behavior:

  1. svcat provision serviceinstance1 --class s3 --plan simple which raises a ErrBadRequest("Some Message") during Provisioning.
  2. kubectl get serviceinstance serviceinstance1 -o yaml and see that ErrorMessage and ResponseError is nil. Also the message "Some Message" is missing.

Expected behavior

  • If Exception ErrBadRequest("Some Description", "Some Error Message", "Some ResponseError") is raised during provisioning I expect following error messages:
kubectl get serviceinstance serviceinstance1 -o yaml
...
status:
  asyncOpInProgress: false
  conditions:
  - lastTransitionTime: "2022-04-22T09:06:57Z"
    message: 'Error provisioning ServiceInstance of ServiceClass (K8S: "space1/s3"
      ExternalName: "space1/s3") at ClusterServiceBroker "s3-broker":
      Status: 400; ErrorMessage: Some Error Message; Description: Some Description;
      ResponseError: Some ResponseError'
    reason: ProvisionCallFailed
    status: "False"
    type: Ready
...
@sonman sonman changed the title Missing ErrorMessage, ResponseError and customized Description in K8s status Missing ErrorMessage, ResponseError and description in K8s status Apr 22, 2022
@sonman
Copy link
Author

sonman commented Apr 22, 2022

I just saw that ErrInvalidParameters Exception exists. This accepts a msg parameter which should be passed to the description output.
Why having ErrInvalidParameters and ErrBadRequest ? ErrInvalidParameters seems only returns a 40X Error on provisioning and updating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant