Skip to content

v1.7.6: panic-safe error parsing on 4xx

Latest

Choose a tag to compare

@clearlifezhang clearlifezhang released this 20 Sep 14:44
8953cf8
  • Make JSON error parsing panic-safe when bodies are empty/malformed.

  • parseJSONError: fallback to status/body snippet; no panics.

  • (*JSONError).Error(): safe when Err slice empty; falls back to http.StatusText.

  • Add tests for 404 cases (well-formed, success-shaped, empty).

  • No API changes.