Problem type:
https://docs.nordicfinancialnews.com/problems/invalid-parameter400 when one of your query parameters cannot be used. It is the most specific of the error types: the response names the parameter at fault in its own parameter member, and detail explains what was wrong with it.
Example response
parameter is an extension member on top of the standard RFC 9457 fields. Read it rather than parsing detail: it is a bare parameter name, stable enough to switch on, whereas detail is prose that can be reworded.
What triggers it
Four shapes of mistake, all reported the same way:- An unrecognized value for a fixed-list filter.
content_type,sector,market_segment,status,event_type,sentimentandsortall validate against a known set, anddetaillists the accepted values. Company filters such astickerbehave the same way, naming every value that failed to resolve. - Two parameters that cannot be combined.
cursorwithq,mode=semanticwithcursor,sortorupdated_after,idswithcursor.detailsays which pairing was rejected and why. - A parameter missing its companion.
mode=semanticandsort=relevanceboth needq, since neither ranking is defined without a query. - A cursor that is invalid or expired. Cursors are opaque and time-limited. Restart the walk from the first page rather than editing one by hand.
The fields variant
An unrecognized name in the fields parameter returns this same problem type, but in a different shape:
unknown_fields array, which makes them easy to log. In exchange, this variant carries no parameter member and a different title. Code that reads parameter unconditionally will find it missing, so check for it before you use it.
The allowed names are per resource: a field that exists on an article does not exist on a company. Field projection lists the set for each. An empty fields= returns the ordinary variant instead, with parameter set to fields.
How to fix it
Fix the request. There is nothing to retry, and repeating an identical call returns an identical error while still counting against your rate limit and monthly quota. Readparameter to find the offending value in your request builder, then detail for the accepted values. If the parameter looks correct, check it is spelled as the API expects and that you are sending it to an endpoint that accepts it: a parameter that is valid on one resource is not automatically valid on another, and a company-scoped path rejects filters the flat equivalent accepts.
Related
- Error handling for the full problem type list
- Pagination for how cursors are issued and when they expire
- Field projection for selecting fields with
fields