Skip to content
This repository has been archived by the owner on Jan 29, 2025. It is now read-only.

Custom binding error messages #1369

Open
gosua opened this issue Jul 23, 2021 · 2 comments
Open

Custom binding error messages #1369

gosua opened this issue Jul 23, 2021 · 2 comments

Comments

@gosua
Copy link

gosua commented Jul 23, 2021

Context

Currently, I am getting something like this whenever a service binding fails:

$ cf create-service-key my-service my-key
Creating service key my-key for service instance my-service as [email protected]...
The service broker returned an invalid response. Status Code: 500 Internal Server Error, Body: {"foo":"bar"}
FAILED

What I am trying to achieve

I am trying to have a custom error message on the cf-client whenever a synchronous binding fails.

Something like this for example:

$ cf create-service-key my-service my-key
Creating service key my-key for service instance my-service as [email protected]...
Service broker error: Foo
FAILED

What I tried

I was wondering what the error: "" field in SFPlan is for. In every example I can find, one can observe that it's set to "".
Screenshot 2021-07-23 at 09 51 08 (1)

Setting it to error: "Foo" causes that the details about the Status Code and Body will be suppressed. However, the actual value "Foo" of error is not being printed.

$ cf create-service-key my-service my-key
Creating service key my-key for service instance my-service as [email protected]...
Service broker error:
FAILED

So my questions are...

  1. Is there a possibility to have custom error messages for binding errors?
  2. What is error: "" for?
  3. Why does error: "Foo" suppress the usual printing of Status Code and Body?
  4. Why does "Foo" not come up on the cf-client whenever specified?
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/178987490

The labels on this github issue will be updated when the story is started.

@anoopjb anoopjb self-assigned this May 5, 2022
@anoopjb
Copy link
Contributor

anoopjb commented May 5, 2022

This is an important finding. 👍 Unfortunately we cannot tackle this soon. 😞 Also, We are open for contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Waiting for Changes | Open for Contributions
Development

No branches or pull requests

3 participants