Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dax/src/request.ts>RequestResponse#throwIfNotOk

Cross-platform shell tools for Deno and Node.js inspired by zx.
Very Popular
Go to Latest
method RequestResponse.prototype.throwIfNotOk
import { RequestResponse } from "https://deno.land/x/dax@0.39.1/src/request.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.