Skip to main content
Module

x/dax/mod.ts>RequestResult#throwIfNotOk

Cross platform shell tools for Deno inspired by zx.
Very Popular
Go to Latest
method RequestResult.prototype.throwIfNotOk
import { RequestResult } from "https://deno.land/x/dax@0.24.0/mod.ts";

Throws if the response doesn't have a 2xx code.

This might be useful if the request was built with .noThrow(), but otherwise this is called automatically for any non-2xx response codes.