Setting PRICE, LATITUDE, LONGITUDE parameters the wrong way returns Server Code 200 w/ no data.
See original GitHub issueOverview
- Client ID: jyHeS_MVualewtI_Ab4wHg
- Issue type: bug
- Summary: Setting
price
parameter the wrong way returns server code 200 and no data. - Platform: node-fetch (via React Native)
Description
I noticed that when I set the price
parameter to 1,2,3,4
instead of 1, 2, 3, 4
, the API will return an error with a server code of 200.
Endpoint
GraphQL Search API
Parameters or Sample Request
https://api.yelp.com/v3/graphql
POST body:
{
search(term: "Restaurants", latitude: 40.747479, longitude: -73.98722, open_now: true, price: "1,2,3,4", radius: 10000, limit: 35) {
business {
name
is_closed
url
phone
display_phone
review_count
rating
price
photos
distance
attributes
categories {
title
alias
}
location {
address1
address2
address3
city
state
zip_code
country
}
coordinates {
latitude
longitude
}
hours {
is_open_now
open {
day
start
end
is_overnight
}
}
reviews {
text
rating
user {
image_url
name
}
time_created
url
}
}
}
}
Response

Extra information
- Setting the price parameter a different way should not throw this kind of error.
- Throwing this kind of error should return a server code 500, not 200.
- The errors are not parsable using
JSON.stringify()
(without replacing characters) because they’re not really JSON due to the string characters being'
instead of"
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Get Started | Maps Static API - Google Developers
The Maps Static API uses numbers (latitude and longitude values) or strings ... will return the same map coverage area as a request...
Read more >Service output—ArcGIS REST APIs
Details: "Invalid reverse geocode values provided in input" This error is returned when the location parameter in a reverseGeocode request includes a value...
Read more >Getting the location from an IP address - php - Stack Overflow
You could download a free GeoIP database and lookup the IP address locally, or you could use a third party service and perform...
Read more >OpenCage Geocoding API Documentation
The value is a point with latitude, longitude coordinates in decimal format. Values that are not valid coordinates are ignored. roadinfo. When set...
Read more >Bing Ads API Operation Error Codes - Microsoft Learn
The corresponding Symbolic Error Code table entries below are noted as Not applicable. Some symbolic error codes begin with the strings ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For 3:
I can just make it valid JSON with the quotes escaped… but on further thought I’m now leaning towards just changing the outputs to be more string-like.
Instead of:
The output would be more like:
This feels a bit more in-line with other graphql implementations out there. We’d have the error string format be “CODE: DESCRIPTION”.
This fix is now live also; I checked that:
no longer errors out.