If I set spring.cloud.config.label=nonexistant,master
then the RestClient receives a 404 on the 'nonexistant' label which is converted to an HttpClientResponseException. The code is checking for a 200 but should also catch the client exception.
See: https://github.com/spring-cloud/spring-cloud-config/blob/5f05eadbd4c0352515ede0d08427e14bd297d737/spring-cloud-config-client/src/main/java/org/springframework/cloud/config/client/ConfigServicePropertySourceLocator.java#L120
Comment From: spencergibb
Closed via 4aaf8cd1881fbcb61d67f59a4cd1080a8a513358
Comment From: ddesna
One question here. If I put spring.cloud.config.label=nonexistant
on config client side, config server returns 404 error but config client does not throw any exception and client application continues trying to start.
Is this behaviour is correct ? Maybe config client should fail if it is not able to retrieve configuration from given label ?
Comment From: ryanjbaxter
Have you tried fail fast? https://docs.spring.io/spring-cloud-config/docs/3.1.1/reference/html/#config-client-fail-fast
Comment From: ddesna
Have you tried fail fast? https://docs.spring.io/spring-cloud-config/docs/3.1.1/reference/html/#config-client-fail-fast
Yep, but it is just in case your client app is not able to connect with config server.
Comment From: ryanjbaxter
Ah I see. You can open an issue and we can see what the community thinks about it