Success and Errors in the same API.
I am getting error in response If I am sending not promoted tweet Id with the tweet fields promotedmetrics key with other fields like organicmetrics.
Instead of error in response, we can have a partial response ( in this case organic_metrics data ) with error is in another node.
This seems an oversight as they have the "partial errors" response for these kind of situation. The response is indeed a partial error (200 OK) for this endpoint too but it only contains the error object and no data.
Felicio Mununga commented
For comparison, and in contrary to `tweet.fields` query parameter, the `media.fields` parameter already supports these "partially successful responses", where what can actually be accessed is returned in `data` or `includes` sections, and what cannot is in `errors`.
Louis G. commented
This would be *really* useful as, currently, it's a game of trial and error since you can't know beforehand which tweets are promoted or not. There are other errors that still return the rest of the data, it shouldn't be too hard to do the same here and just not return promoted_metrics or have it with null values rather than returning those errors.