Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

JSON payload error when trying to attach flowhook #20

Closed
rhawleyiii opened this issue Apr 8, 2022 · 1 comment
Closed

JSON payload error when trying to attach flowhook #20

rhawleyiii opened this issue Apr 8, 2022 · 1 comment

Comments

@rhawleyiii
Copy link

rhawleyiii commented Apr 8, 2022

I am trying to attach a flowhook using the Linux binary, and receiving a JSON payload error.

$ apigeecli flowhooks attach -n PreTargetFlowHook -s rj-SFPreTargetHookV1 -e sandbox01
ERROR: 2022/04/08 09:37:33 httpclient.go:349: status code 400, error in response: {
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"name\" at 'body': Cannot find field.",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.BadRequest",
        "fieldViolations": [
          {
            "field": "body",
            "description": "Invalid JSON payload received. Unknown name \"name\" at 'body': Cannot find field."
          }
        ]
      }
    ]
  }
}

Get and Detach functions work correctly

$ apigeecli flowhooks get -e sandbox01 -n PreTargetFlowHook
{
	"flowHookPoint": "PreTargetFlowHook",
	"sharedFlow": "rj-SFPreTargetHookV1",
	"continueOnError": true
}

$ apigeecli flowhooks detach -n PreTargetFlowHook -e sandbox01
{
	"flowHookPoint": "PreTargetFlowHook",
	"continueOnError": true
}
srinandan added a commit that referenced this issue Apr 12, 2022
@srinandan
Copy link
Owner

I have a fix for it. When I publish the next release, I will include this.

srinandan added a commit that referenced this issue Apr 13, 2022
fix #20 - incorrect field name to attach flowhooks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants