Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue #15965 - Included further information for exceptions when… #158

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

C-Bish
Copy link

@C-Bish C-Bish commented Mar 23, 2017

… a geo-point type field is entered incorrectly

This PR fixes issues for exceptions not giving you sufficient information when you enter a geo-point type field in an incorrect format.

Changes:

  • Changed the original exception message to include further information
  • Added in another exception

Testing:
I tested my changes by entering in the following commands

1: Command for mapping the fields to the geo-point type
curl -XPUT 'http://localhost:9200/attraction?pretty' -H'Content-Type: application/json' -d'
{
"mappings": {
"restaurant": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}
}'

2: Command for putting incorrect geo-point (This should throw the exception error):
curl -XPUT 'http://localhost:9200/attraction/restaurant/2?pretty' -H 'Content-Type: application/json' -d '
{
"location": "127.0.0.1"
}'

Valid geo-point field is "lat, lon" or enter a geo-hash as a string.

Has been tested using the testing suite.

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS that we support?

…ns when a geo-point type field is entered incorrectly

Squashed commits:
Created an exception when a full stop is used for a geopoint type
Changed the exception message to include further information regarding the malformed field
@kblincoe kblincoe merged commit 310998c into kblincoe:master Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants