twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

Add fixture for "Invalid language code(s)" #56

Closed dentarg closed 6 years ago

dentarg commented 8 years ago

For the search pattern shoes lang:asdf I got this XML back:

<blogstream xmlns="http://www.twingly.com">
<operationResult resultType="failure">
Search was unable to proceed: Invalid language code(s)
</operationResult>
</blogstream>
roback commented 6 years ago

A response from Search API v3 looks like:

<error code="40002">
<message>Invalid language code(s) for parameter: Lang</message>
</error>

All errors in v3 follows the same structure as above. We already have a fixture for a similar error: https://github.com/twingly/twingly-search-api-ruby/blob/785d8604c2422eee7a1abc26422649fcdc57f861/spec/fixtures/nonexistent_api_key_result.xml#L1-L3

I'll just close this issue.