spring-cloud / spring-cloud/spring-cloud-config
Send error body from environment controller
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2k
- Forks
- 1.3k
- Avg merge
- 2d 59m
- Merged PRs (30d)
- 16
Description
We are using spring-cloud-config-client-2.0.0.RELEASE.
In case of config branch not available then config server fails with following message which is not enough to pin point the exact problem:
o.s.c.c.c.ConfigServicePropertySourceLocator - Fetching config from server at: http://my-config-server:8888
ERROR [] o.s.boot.SpringApplication - Application startup failedjava.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing
The above message seems to be coming from following line of ConfigServicePropertySourceLocator
if (properties.isFailFast()) {
throw new IllegalStateException(
"Could not locate PropertySource and the fail fast property is set, failing" +
(errorBody == null ? "" : ": " + errorBody), error);
}
This could come due to many reasons but in the case of branch not found it should at least log absolute branch URL or give branch not found.
Suggestions are welcome or if I miss anything. My Microservice which is utilizing config server is using spring boot fail fast.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ConfigServicePropertySourceLocator and the fail-fast error path shown in the issue. Reproduce a missing config branch and inspect the available error body; done means the startup failure identifies the branch-not-found cause or includes the relevant branch URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100