New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@friggframework/errors

Package Overview
Dependencies
Maintainers
3
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@friggframework/errors - npm Package Compare versions

Comparing version 1.1.6-canary.e3d64e0.0 to 1.1.6

14

CHANGELOG.md

@@ -0,1 +1,15 @@

# v1.1.6 (Wed Feb 08 2023)
#### 🐛 Bug Fix
- URLSearchParams (used in OAuth2 base) was not printing out bodies in … [#124](https://github.com/friggframework/frigg/pull/124) ([@seanspeaks](https://github.com/seanspeaks))
- URLSearchParams (used in OAuth2 base) was not printing out bodies in error logs. ([@seanspeaks](https://github.com/seanspeaks))
- Bump independent versions \[skip ci\] ([@seanspeaks](https://github.com/seanspeaks))
#### Authors: 1
- Sean Matthews ([@seanspeaks](https://github.com/seanspeaks))
---
# v1.1.5 (Wed Jan 18 2023)

@@ -2,0 +16,0 @@

9

fetch-error.js

@@ -13,3 +13,10 @@ const { BaseError } = require('./base-error');

const method = init?.method ?? 'GET';
const initText = init ? JSON.stringify({ init }, null, 2) : '';
const initText = init
? init.body instanceof URLSearchParams
? (() => {
init.body = init.body.toString();
return JSON.stringify({ init }, null, 2);
})()
: JSON.stringify({ init }, null, 2)
: '';

@@ -16,0 +23,0 @@ let responseBodyText = '<response body is unavailable>';

const fetch = require('node-fetch');
const { stripIndent } = require('common-tags');
const { FetchError } = require('./fetch-error');
const FormData = require('form-data');

@@ -54,2 +55,26 @@ describe('FetchError', () => {

});
it.only('prints a formData body legibly', async () => {
const response = {
status: 500,
statusText: 'Space aliens!',
headers: Object.entries({ 'cache-control': '123' }), // needs to be an Iterable
text: async () => '<!doctype html>',
};
const params = new URLSearchParams();
params.append('test', 'test');
const init = {
method: 'POST',
credentials: 'include',
headers: {},
query: {},
body: params,
returnFullRes: false,
};
const error = await FetchError.create({ response, init });
expect(error).toHaveProperty('message');
expect(error.message).toContain('test=test');
});
});

6

package.json
{
"name": "@friggframework/errors",
"version": "1.1.6-canary.e3d64e0.0",
"version": "1.1.6",
"prettier": "@friggframework/prettier-config",

@@ -8,3 +8,3 @@ "description": "",

"devDependencies": {
"@friggframework/eslint-config": "1.0.9-canary.e3d64e0.0",
"@friggframework/eslint-config": "^1.0.8",
"eslint": "^8.22.0",

@@ -23,3 +23,3 @@ "jest": "^28.1.3",

},
"gitHead": "e3d64e033a024a7211d58bf6bfe041a972bd8504"
"gitHead": "ddaa7594712f23f65d31b1cd5cbbc22bf7977776"
}
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