Subject of the issue
If a schedule is updated and there was an error then this is not propagated to the cf api.
There are 2 types of error not propagated.
- bad request ( bad schedule or policy)
- Error saving or updating a policy
Expected behaviour
The golangapi service should propagate the 400 or error response back to the cc api so the user can retry or remediate the issue.
Actual behaviour
Currently we just sweep it under the rug by ALWAYS returning 200 OK..
it does have this test which suggest this is on purpose but why ?
Context("When scheduler returns non 200 and non 204 status code", func() {
BeforeEach(func() {
pathVariables["appId"] = TEST_APP_ID
req, _ = http.NewRequest(http.MethodPut, "", bytes.NewBufferString(VALID_POLICY_STR))
schedulerStatus = 500
})
It("should succeed", func() {
Expect(resp.Code).To(Equal(http.StatusOK))
})
})
This was notice via code review in particular public_api_handler.go:L153-158
Subject of the issue
If a schedule is updated and there was an error then this is not propagated to the cf api.
There are 2 types of error not propagated.
Expected behaviour
The golangapi service should propagate the 400 or error response back to the cc api so the user can retry or remediate the issue.
Actual behaviour
Currently we just sweep it under the rug by ALWAYS returning 200
OK..it does have this test which suggest this is on purpose but why ?
This was notice via code review in particular public_api_handler.go:L153-158