spring-cloud / spring-cloud/spring-cloud-config

Send error body from environment controller

Open
#1,217 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.