Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hapi/boom

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/boom - npm Package Compare versions

Comparing version 8.0.1 to 9.0.0

10

lib/index.d.ts

@@ -433,3 +433,13 @@ /**

/**
* Returns a 425 Too Early error
*
* @param message - Optional message
* @param data - Optional additional error data
*
* @returns A 425 Too Early error
*/
export function tooEarly<Data>(message?: string, data?: Data): Boom<Data>;
/**

@@ -436,0 +446,0 @@ * Returns a 428 Precondition Required error

17

lib/index.js

@@ -48,3 +48,3 @@ 'use strict';

[424, 'Failed Dependency'],
[425, 'Unordered Collection'],
[425, 'Too Early'],
[426, 'Upgrade Required'],

@@ -161,3 +161,3 @@ [428, 'Precondition Required'],

let wwwAuthenticate = `${scheme} `;
let wwwAuthenticate = `${scheme}`;

@@ -172,7 +172,7 @@ if (attributes ||

if (typeof attributes === 'string') {
wwwAuthenticate += Hoek.escapeHeaderAttribute(attributes);
wwwAuthenticate += ' ' + Hoek.escapeHeaderAttribute(attributes);
err.output.payload.attributes = attributes;
}
else {
wwwAuthenticate += Object.keys(attributes).map((name) => {
wwwAuthenticate += ' ' + Object.keys(attributes).map((name) => {

@@ -195,6 +195,6 @@ let value = attributes[name];

if (attributes) {
wwwAuthenticate += ', ';
wwwAuthenticate += ',';
}
wwwAuthenticate += `error="${Hoek.escapeHeaderAttribute(message)}"`;
wwwAuthenticate += ` error="${Hoek.escapeHeaderAttribute(message)}"`;
err.output.payload.attributes.error = message;

@@ -340,3 +340,8 @@ }

exports.tooEarly = function (message, data) {
return new exports.Boom(message, { statusCode: 425, data, ctor: exports.tooEarly });
};
exports.preconditionRequired = function (message, data) {

@@ -343,0 +348,0 @@

@@ -1,2 +0,2 @@

Copyright (c) 2012-2019, Sideway Inc, and project contributors
Copyright (c) 2012-2020, Sideway Inc, and project contributors
Copyright (c) 2012-2014, Walmart.

@@ -3,0 +3,0 @@ All rights reserved.

{
"name": "@hapi/boom",
"description": "HTTP-friendly error objects",
"version": "8.0.1",
"version": "9.0.0",
"repository": "git://github.com/hapijs/boom",

@@ -16,7 +16,7 @@ "main": "lib/index.js",

"dependencies": {
"@hapi/hoek": "8.x.x"
"@hapi/hoek": "9.x.x"
},
"devDependencies": {
"@hapi/code": "6.x.x",
"@hapi/lab": "20.x.x"
"@hapi/code": "8.x.x",
"@hapi/lab": "22.x.x"
},

@@ -23,0 +23,0 @@ "scripts": {

@@ -15,3 +15,4 @@ <a href="https://hapi.dev"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a>

- [Version status](https://hapi.dev/resources/status/#boom) (builds, dependencies, node versions, licenses, eol)
- [Changelog](https://hapi.dev/family/boom/changelog/)
- [Project policies](https://hapi.dev/policies/)
- [Free and commercial support options](https://hapi.dev/support/)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc