Don't fail silently if the remote YML file is not correct.
We spent almost the whole day trying to figure out why spring-cloud-config suddenly stopped working.
At the end of the day we found out that some yml files had tab idents instead of the needed spaces. With local yml files you get an exception when something is wrong with the syntax. But if you have an incorrect yml file in the git repo you just get a 500 error and no stack track or any other information.
I had the exact same problem this morning. I had two files in my repo, config.properties and config.yml. The config server stopped working because of the yml issue.
The config server shouldn't throw a 500 if the the config(properties or yml) file cannot be parsed.
The config server shouldn't throw a 500 if the the config(properties or yml) file cannot be parsed.
Why? 500 seems like the most obvious status code if there is an error in the input data.
you just get a 500 error and no stack track or any other information
Actually you get an ERROR log with the exception message. The stack trace would not be very helpful (on the client that is). Or are you talking about the server (maybe we could log the error there)?
The error code 500 is alright If we "must" to provide an error code. Important is that Cloud-Config should not fail silently (client or server) by just returning 500. Because without a context the 500 code can mean anything and I suppose this is what @ashley7070 had in mind.
You can set spring.cloud.config.failFast=true if you want to fail fast on the client. I'll have a look at making the error logs more informative.
I don't mind the 500 error code. The problem I have is that the config-server fail to serve my other properties/yml if it fails to parse one(or more) properties/yml file. Ideally it should throw an error in the logs but still be able to serve my other "properly" formatted properties/yml files.
You lost me there I'm afraid. IMO if there's an error we should make it more visible, not less visible. However, if you disagree and want to change it, it's in Spring Boot where you should look to make the change, since Spring Boot is responsible for parsing the config files and turning them into property sources.
It seems like #67 probably has a bearing on this as well. Possibly even if we figure out what's going on there this issue won't matters so much or at all.
You lost me there I'm afraid.
If you could point your config server to my repo, it would make more sense.
Doing a GET on the config server returns a 500 even though my config-client.properties is well formatted. It fails because it failed to parse config-client.yml.
Shouldn't the config server still work in this case and not break completely?
In my opinion (again), no, it should not. It should be all or nothing - you either have correct input data or not. If you disagree that's fine, but we'd need to discuss in a new issue now that this is fixed (IMO).