You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parity(postgrest): return structured error for non-JSON body on successful 2xx responses [from supabase-js] #260
When a PostgREST request returns 2xx but the body is not valid JSON (e.g., HTML 502 from a proxy), the SDK was throwing an unhandled JsonException. Fix: catch the JSON parse failure and return a structured PostgrestError with the raw body as the message.
Code Reference
try{data=JSON.parse(body)}catch{error={message: body}// raw body → error messagedata=null}
Expected Behaviors
HTTP 200 with "<html>502 Bad Gateway</html>"
→ PostgrestResponse { Data = null, Error = PostgrestError(Message = "<html>...") }
NOT: throws JsonException
Acceptance Criteria
Non-JSON 2xx body returns PostgrestError (not thrown exception)
Activity