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

@ministryofjustice/fb-jwt-client-node

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ministryofjustice/fb-jwt-client-node - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

8

lib/fb-jwt-client.js

@@ -287,12 +287,12 @@ const request = require('request-promise-native')

} else if (err.error) {
const code = err.error.code || 'EUNSPECIFIED'
const message = err.error.name || err.error.code || 'EUNSPECIFIED'
let statusCode = 500
if (code === 'ENOTFOUND') {
if (message === 'ENOTFOUND') {
// no dns resolution
statusCode = 502
} else if (code === 'ECONNREFUSED') {
} else if (message === 'ECONNREFUSED') {
// connection rejected
statusCode = 503
}
this.throwRequestError(statusCode, code)
this.throwRequestError(statusCode, message)
// Handle errors that have not been specified

@@ -299,0 +299,0 @@ } else {

@@ -314,3 +314,3 @@ const test = require('tape')

error.error = {
code: requestErrorCode
name: requestErrorCode
}

@@ -383,3 +383,3 @@ } else {

test('When making a get request and an unspecified error code is returned', async t => {
testGetError(t, 'EMADEUP', 500)
testGetError(t, 'e.madeup', 500)
})

@@ -414,3 +414,3 @@

test('When making a post request and an unspecified error code is returned', async t => {
testPostError(t, 'EMADEUP', 500)
testPostError(t, 'e.madeup', 500)
})

@@ -417,0 +417,0 @@

{
"name": "@ministryofjustice/fb-jwt-client-node",
"version": "0.0.18",
"version": "0.0.19",
"description": "Form Builder JSON Web Token Client (Node)",

@@ -20,7 +20,7 @@ "main": "lib/fb-jwt-client.js",

"devDependencies": {
"@ministryofjustice/eslint-config-fb": "^1.0.4",
"@ministryofjustice/eslint-config-fb": "^1.0.5",
"multi-tape": "^1.2.1",
"npm-run-all": "^4.1.5",
"proxyquire": "^2.1.0",
"sinon": "^7.2.7",
"sinon": "^7.3.1",
"tape": "^4.10.1"

@@ -31,3 +31,3 @@ },

"aes256": "^1.0.4",
"jsonwebtoken": "^8.5.0",
"jsonwebtoken": "^8.5.1",
"path-to-regexp": "^3.0.0",

@@ -34,0 +34,0 @@ "request": "^2.88.0",

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