ns-http-gotchas

Installation
SKILL.md

Http helpers are status-blind

Http.getJSON, getString, getFile, getImage reject only on transport failure or content-conversion failure. The HTTP status code is never consulted:

  • A 500 that returns valid JSON ({"error": "..."}) resolves successfully — your error payload becomes your data.
  • A 404 returning an HTML error page makes getJSON reject with a JSON parse error — which reads like a client-side bug and sends you debugging the wrong layer.

The correct pattern: request + status check

import { Http } from '@nativescript/core';
Installs
20
GitHub Stars
1
First Seen
Aug 28, 2026
ns-http-gotchas — nativescript/skills