apollo-server-errors
Advanced tools
Comparing version 2.0.0-rc.3 to 2.0.0-rc.5
@@ -20,4 +20,3 @@ "use strict"; | ||
function enrichError(error, debug = false) { | ||
const expanded = {}; | ||
Object.defineProperties(expanded, { | ||
const expanded = Object.create(Object.getPrototypeOf(error), { | ||
name: { | ||
@@ -24,0 +23,0 @@ value: error.name, |
{ | ||
"name": "apollo-server-errors", | ||
"version": "2.0.0-rc.3", | ||
"version": "2.0.0-rc.5", | ||
"author": "opensource@apollographql.com", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -40,6 +40,5 @@ import { GraphQLError } from 'graphql'; | ||
function enrichError(error: Partial<GraphQLError>, debug: boolean = false) { | ||
const expanded = {} as any; | ||
// follows similar structure to https://github.com/graphql/graphql-js/blob/master/src/error/GraphQLError.js#L145-L193 | ||
// with the addition of name | ||
Object.defineProperties(expanded, { | ||
const expanded = Object.create(Object.getPrototypeOf(error), { | ||
name: { | ||
@@ -46,0 +45,0 @@ value: error.name, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23645
462