Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/tools/release/deps.ts>dax.RequestResult#throwIfNotOk

A modern runtime for JavaScript and TypeScript.
Go to Latest
method dax.RequestResult.prototype.throwIfNotOk
import { dax } from "https://deno.land/x/deno@v1.39.3/tools/release/deps.ts";
const { RequestResult } = dax;

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.