clearlydefined / clearlydefined/service

API returns an error if only one set of coordinates is invalid

Open
#830 1 comment 1 reaction 0 assignees View on GitHub
enhancement good first issue
Dominant language
TypeScript
Stars
51
Forks
46
PR merge metrics
No merged PRs in 30d

Description

When I send a request with dozens or hundreds of coordinates, but one of them is either malformed (#793) or has a type/source that is unknown, the return value is an error message. I'm already rejecting malformed coordinates from my request (relatively easy). Dealing with unhandled types and sources is harder. The obvious workaround is to send IDs individually, but I don't think that anybody is well served by increasing API calls. Alternatively, I suppose that I could batch together the ones with similar types and sources and have them accepted/rejected together.

Is there an API that provides a list of valid types and sources?

It would be better (at least for me), if individual records are rejected by either not including them in the returned JSON payload, or, perhaps with `null` content or something similar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.