Skip to content

basalt / drives-dropbox/src / errorSummary

Function: errorSummary() ​

> errorSummary(body, status): string

Defined in: drives-dropbox/src/errors.ts:44

Pulls Dropbox's error_summary out of a response body.

Only a value that looks like Dropbox's own taxonomy is kept. Anything else — an HTML error page from a proxy, a stack trace, a body an attacker got to influence — is replaced by http_<status>, because this string ends up in details, which @basaltkit/http serialises into a response and @basaltkit/audit stores.

Parameters ​

body ​

string

status ​

number

Returns ​

string

Released under the MIT License.