cloud-cf-feature-flags-sample icon indicating copy to clipboard operation
cloud-cf-feature-flags-sample copied to clipboard

Add status codes to responses

Open Haegi opened this issue 4 years ago • 1 comments

Motivation

We noticed that this application always returns the status code 200. Even if the feature toggle couldn't be found or the service is not even there. This makes it hard to use this application as automated e2e test scenarios as we can not check for the status code but we have to check the body of the returned HTML content.

Solution

In this PR we added the status code 500 if the service instance is missing and 404 if the feature toggle couldn't be found. Everything else still returns 200.

Tagging my pair: @phil9909

Haegi avatar Oct 05 '21 13:10 Haegi

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Benjamin Haegenlaeuer seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 05 '21 13:10 CLAassistant