mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[core router] Improve error message when version header is missing (#159601)
## Summary Across the kibana code base there are a number of http client wrappers, some of which have special handling of the version header and some don't. This can be quite confusing when you get an error message that says "Please specify a version." and you _are_ specifying a version header but you're not specifying _the_ version header. Now the error message will remind you where it expects to find the version.
This commit is contained in:
parent
17b5fd39b4
commit
f2dbde14e9
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ export class CoreVersionedRoute implements VersionedRoute {
|
|||
|
||||
if (!this.hasVersion(req) && (this.isInternal || this.router.isDev)) {
|
||||
return res.badRequest({
|
||||
body: `Please specify a version. Available versions: ${this.versionsToString()}`,
|
||||
body: `Please specify a version via ${ELASTIC_HTTP_VERSION_HEADER} header. Available versions: ${this.versionsToString()}`,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue