spring-cloud / spring-cloud-config

External configuration (server and client) for Spring Cloud
Apache License 2.0
1.95k stars 1.29k forks source link

spring cloud config - Bit bucket issue web hook push 400 bad request #1529

Closed srinivasmeenavalli closed 4 years ago

srinivasmeenavalli commented 4 years ago

Bit bucket Web hook url : /monitor/bus-refresh changed actuator base path via confuration: management.endpoints.web.base-path=monitor Sample Request : Headers: X-Request-Id: 77c22d70-36a6-47c3-9315-67d5cb110931 Content-Type: application/json; charset=utf-8 X-Event-Key: repo:refs_changed Body : { "eventKey": "repo:refs_changed", "date": "2019-12-24T12:03:52+0000", "actor": { "name": "XXXXXX", "emailAddress": "xxxxxx@xxxxx.com", "id": 1699, "displayName": "Srinivasa.Rao", "active": true, "slug": "xxxxxxxx", "type": "NORMAL" }, "repository": { "slug": "env-config", "id": 3334, "name": "env-config", "scmId": "git", "state": "AVAILABLE", "statusMessage": "Available", "forkable": true, "project": { "key": "xxxxxx", "id": 1136, "name": "xxxxxx", "public": false, "type": "NORMAL" }, "public": false }, "changes": [ { "ref": { "id": "refs/heads/master", "displayId": "master", "type": "BRANCH" }, "refId": "refs/heads/master", "fromHash": "6bd537fb2740c374ca2d42192bcda4322276bb38", "toHash": "98514becba3986cad0a71a182e14be52aa7c5c00", "type": "UPDATE" } ] } Sample Response

Headers
Cache-Control: no-cache, no-store, max-age=0, must-revalidate X-Frame-Options: DENY Date: Tue, 24 Dec 2019 12:03:45 GMT Pragma: no-cache Set-Cookie: ARRAffinity=4e8a51dc9165bd907c70a65faa47eb80f0a0ecc06a9af22efb19a5cbc488f39b;Path=/;HttpOnly;Domain=gcd-config-service.azurewebsites.net X-XSS-Protection: 1; mode=block Expires: 0 Content-Type: application/json Via: 1.1 localhost (Apache-HttpClient/4.4.1 (cache)) X-Content-Type-Options: nosniff Transfer-Encoding: chunked Response

{ "timestamp": "2019-12-24T12:03:45.277+0000", "status": 400, "error": "Bad Request", "message": "JSON parse error: Cannot deserialize instance of java.lang.String out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 75] (through reference chain: java.util.LinkedHashMap[\"actor\"])", "path": "/configserver/monitor/refresh" }

spencergibb commented 4 years ago

/bus-refresh isn't built for webhooks. Only /monitor

srinivasmeenavalli commented 4 years ago

Agree

srinivasmeenavalli commented 4 years ago

Please close this issue