fix(api): check if the response body is a json error response

1 job for peertube-types in 8 seconds (queued for 24 seconds)