Skip to content

Make GraphError real Error #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 5, 2020
Merged

Conversation

OlivierCuyp
Copy link
Contributor

@OlivierCuyp OlivierCuyp commented Oct 2, 2020

Summary

Make GraphError a real JS Error with a stacktrace

Motivation

Current GraphError is not a real Error and thus it misses the stacktrace.

Test plan

Demonstrate the code is solid. Example: The exact commands you ran and their output.

Closing issues

Fixes #248

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@ghost
Copy link

ghost commented Oct 2, 2020

CLA assistant check
All CLA requirements met.

assert.equal(gError.statusCode, -1);
assert.equal(gError.code, null);
assert.equal(gError.message, null);
assert.equal(gError.body, null);
assert.equal(gError.requestId, null);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add unit tests verifying if stack is set or defined as expected as per the new line added in this PR ->
this.stack = baseError ? baseError.stack : this.stack; ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably need an issue to track adding a stack assertion for each of the cases here.

@ddyett
Copy link
Contributor

ddyett commented Oct 5, 2020

thanks for the contribution @OlivierCuyp

@nikithauc nikithauc merged commit ad4399b into microsoftgraph:dev Oct 5, 2020
@OlivierCuyp
Copy link
Contributor Author

@ddyett with pleasure

@OlivierCuyp OlivierCuyp deleted the real-error branch October 8, 2020 17:05
nikithauc added a commit that referenced this pull request Oct 9, 2020
* updated broken link in README

* Post request with empty body, now working fine.

* updated the tests for this case

* made change to use undefined instead of null as classname

* added functionality to simplify building middleware chain

* Updated GraphRequest.ts for .count() scenario

Updated GraphRequest.ts to handle .count() when no parameter is specified

* Bumped version to '2.1.0-Preview.1'

* Adding the Modifying middleware chain samples

* - fixes broken link to client instance

* Updated the example to the correct return type

* fix casing on filename

* Update package.json

* Designed ChaosHandler

* Removing the set and get middleware chain method

* Update README

* Update README

* Bump lodash from 4.17.15 to 4.17.19 in /samples/browser

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

* Changed parsepath and query functions to split query params on first equals sign considering nested queries. Added comments to query functions

* Correcting spelling in comments, setting the param key directlyand replacing ternary condition with if else

* Adding a buildheaders function to conditionally set content type and checking if body is null when serializing content

* Altering condition to be optimal

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding formdata to the node project, setting the esModuleInterop config as true for allowing import of npm modules, adding unit test for application/xhtml+xml content type post

* Adding a private query parsing function and more validations

* Adding tests for url parsing and comments to the private url parsing functions

* Adding more information in the return comments for functions returning the GraphRequest instance

* Adding unit test for serializecontent testing if content is null, changed content type setting for put and patch

* Changing the conditional expression to check for undefined or null headers

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding the missing return

Co-authored-by: Mustafa Zengin <[email protected]>

* Removing the try catch block from the test case

* Removing the try catch block from the test case

* Returning if the content-type is present else setting content-type as default

* Uninstalling formdata, restoring the tsconfigs and removing the condition to check if form-data is undefined in GraphRequest.ts

* Restoring file

* Reverting the package json changes

* Bump yargs-parser from 13.1.1 to 13.1.2 in /samples/browser (#321)

Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mixin-deep from 1.3.1 to 1.3.2 in /scripts (#301)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Bump http-proxy from 1.17.0 to 1.18.1 in /samples/browser (#319)

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.17.0...1.18.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update OneDriveLargeFileUploadTask.ts (#325)

* Update OneDriveLargeFileUploadTask.ts

Trying to upload files with the '#' or '%' character in the filename ends with network errors of the form -
400 status response "The parameter item does not exist in method getByPath" 

Encoding the entire URL does not encode URL components correctly. When the SDK's client tries to encode these URL components in the parameters on the call to OneDriveLargeFileUploadTask.create, then the resultant file in OneDrive has the URL encoded filename (as opposed to the user-friendly/decoded filename). Therefore, fix the encoding in the SDK's URL components itself, directly.

* Update OneDriveLargeFileUploadTask.ts

Fix typo

* Update src/tasks/OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Update OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Use correct class name (#284)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Typo in documentation example. (#270)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Enhancement/#311 page iterator request options (#318)

* Adding request options property to PageIterator

* Adding tests for page iterator task to test passing along the headers

* using headersinit type for headers

* Specifying parameter definition

* using constants

* Updating function documentation

* remove response type, test passing fetchoptions

* testing requestOptions set in pageiterator

* typos, optional parameters comments

* Sorting parameter list - chaoshandleroptions (#334)

* Client init with middleware array (#333)

* Passing midddleware array in client options

* Tests for middleware array

* Removing try catch

* ifnode condition,chain middleware test

* Adding missing exports

* Array initialization

Co-authored-by: Vincent Biret <[email protected]>

* merging with dev

* Using spread operator

* Checking if middleware is not empty

Co-authored-by: Vincent Biret <[email protected]>

* Make GraphError real Error (#335)

Co-authored-by: nikithauc <[email protected]>

* Using ternary shorthand, upgrade preview 2.1.0-2 (#337)

* Bump version to 2.1.0

* changing.substring parameter, comments to check middleware

* adding tests, urlotherqueryoptions type

Co-authored-by: Abhinav Srivastava <[email protected]>
Co-authored-by: muthurathinam <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: warreee <[email protected]>
Co-authored-by: Gideon Goldberg <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Behnam Mohammadi <[email protected]>
Co-authored-by: DeVere Dyett <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Michael Mainer <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Hari Sridharan <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: mattdenkers <[email protected]>
Co-authored-by: lewgordon <[email protected]>
Co-authored-by: Olivier Cuypers <[email protected]>
@jviney
Copy link

jviney commented Oct 20, 2020

I think this change has broken instanceof checks in Typescript. Previously a check like err instanceof GraphError would work as intended, now it always returns false.

See here for details on the Typescript issue:

microsoft/TypeScript#13965
https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work

The issue can be worked around by editing the prototype as described in the TS docs above. This may not be considered a problem because it is standard TS behavior, but it is a breaking change from the previous version.

nikithauc added a commit that referenced this pull request Oct 23, 2020
* FIx Batching Documentation code

The code example in the Batching Documentation does not work. The batchResponse is not set in the example code.

* Correcting missing import, incorrect reference in example (#326)

* Release - 2.1.0 (#338)

* updated broken link in README

* Post request with empty body, now working fine.

* updated the tests for this case

* made change to use undefined instead of null as classname

* added functionality to simplify building middleware chain

* Updated GraphRequest.ts for .count() scenario

Updated GraphRequest.ts to handle .count() when no parameter is specified

* Bumped version to '2.1.0-Preview.1'

* Adding the Modifying middleware chain samples

* - fixes broken link to client instance

* Updated the example to the correct return type

* fix casing on filename

* Update package.json

* Designed ChaosHandler

* Removing the set and get middleware chain method

* Update README

* Update README

* Bump lodash from 4.17.15 to 4.17.19 in /samples/browser

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

* Changed parsepath and query functions to split query params on first equals sign considering nested queries. Added comments to query functions

* Correcting spelling in comments, setting the param key directlyand replacing ternary condition with if else

* Adding a buildheaders function to conditionally set content type and checking if body is null when serializing content

* Altering condition to be optimal

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding formdata to the node project, setting the esModuleInterop config as true for allowing import of npm modules, adding unit test for application/xhtml+xml content type post

* Adding a private query parsing function and more validations

* Adding tests for url parsing and comments to the private url parsing functions

* Adding more information in the return comments for functions returning the GraphRequest instance

* Adding unit test for serializecontent testing if content is null, changed content type setting for put and patch

* Changing the conditional expression to check for undefined or null headers

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding the missing return

Co-authored-by: Mustafa Zengin <[email protected]>

* Removing the try catch block from the test case

* Removing the try catch block from the test case

* Returning if the content-type is present else setting content-type as default

* Uninstalling formdata, restoring the tsconfigs and removing the condition to check if form-data is undefined in GraphRequest.ts

* Restoring file

* Reverting the package json changes

* Bump yargs-parser from 13.1.1 to 13.1.2 in /samples/browser (#321)

Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mixin-deep from 1.3.1 to 1.3.2 in /scripts (#301)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Bump http-proxy from 1.17.0 to 1.18.1 in /samples/browser (#319)

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.17.0...1.18.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update OneDriveLargeFileUploadTask.ts (#325)

* Update OneDriveLargeFileUploadTask.ts

Trying to upload files with the '#' or '%' character in the filename ends with network errors of the form -
400 status response "The parameter item does not exist in method getByPath" 

Encoding the entire URL does not encode URL components correctly. When the SDK's client tries to encode these URL components in the parameters on the call to OneDriveLargeFileUploadTask.create, then the resultant file in OneDrive has the URL encoded filename (as opposed to the user-friendly/decoded filename). Therefore, fix the encoding in the SDK's URL components itself, directly.

* Update OneDriveLargeFileUploadTask.ts

Fix typo

* Update src/tasks/OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Update OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Use correct class name (#284)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Typo in documentation example. (#270)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Enhancement/#311 page iterator request options (#318)

* Adding request options property to PageIterator

* Adding tests for page iterator task to test passing along the headers

* using headersinit type for headers

* Specifying parameter definition

* using constants

* Updating function documentation

* remove response type, test passing fetchoptions

* testing requestOptions set in pageiterator

* typos, optional parameters comments

* Sorting parameter list - chaoshandleroptions (#334)

* Client init with middleware array (#333)

* Passing midddleware array in client options

* Tests for middleware array

* Removing try catch

* ifnode condition,chain middleware test

* Adding missing exports

* Array initialization

Co-authored-by: Vincent Biret <[email protected]>

* merging with dev

* Using spread operator

* Checking if middleware is not empty

Co-authored-by: Vincent Biret <[email protected]>

* Make GraphError real Error (#335)

Co-authored-by: nikithauc <[email protected]>

* Using ternary shorthand, upgrade preview 2.1.0-2 (#337)

* Bump version to 2.1.0

* changing.substring parameter, comments to check middleware

* adding tests, urlotherqueryoptions type

Co-authored-by: Abhinav Srivastava <[email protected]>
Co-authored-by: muthurathinam <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: warreee <[email protected]>
Co-authored-by: Gideon Goldberg <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Behnam Mohammadi <[email protected]>
Co-authored-by: DeVere Dyett <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Michael Mainer <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Hari Sridharan <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: mattdenkers <[email protected]>
Co-authored-by: lewgordon <[email protected]>
Co-authored-by: Olivier Cuypers <[email protected]>

Co-authored-by: Abrax20 <[email protected]>
Co-authored-by: Darrel <[email protected]>
Co-authored-by: Abhinav Srivastava <[email protected]>
Co-authored-by: muthurathinam <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: warreee <[email protected]>
Co-authored-by: Gideon Goldberg <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Behnam Mohammadi <[email protected]>
Co-authored-by: DeVere Dyett <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Michael Mainer <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Hari Sridharan <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: mattdenkers <[email protected]>
Co-authored-by: lewgordon <[email protected]>
Co-authored-by: Olivier Cuypers <[email protected]>
@nikithauc
Copy link
Contributor

@jviney Version 2.1.1 addresses the breaking change caused by the GraphError extending Error.

Thank you for bringing this issue to our notice! I appreciate it :)

nikithauc added a commit that referenced this pull request Nov 18, 2020
* FIx Batching Documentation code

The code example in the Batching Documentation does not work. The batchResponse is not set in the example code.

* Correcting missing import, incorrect reference in example (#326)

* Release - 2.1.0 (#338)

* updated broken link in README

* Post request with empty body, now working fine.

* updated the tests for this case

* made change to use undefined instead of null as classname

* added functionality to simplify building middleware chain

* Updated GraphRequest.ts for .count() scenario

Updated GraphRequest.ts to handle .count() when no parameter is specified

* Bumped version to '2.1.0-Preview.1'

* Adding the Modifying middleware chain samples

* - fixes broken link to client instance

* Updated the example to the correct return type

* fix casing on filename

* Update package.json

* Designed ChaosHandler

* Removing the set and get middleware chain method

* Update README

* Update README

* Bump lodash from 4.17.15 to 4.17.19 in /samples/browser

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

* Changed parsepath and query functions to split query params on first equals sign considering nested queries. Added comments to query functions

* Correcting spelling in comments, setting the param key directlyand replacing ternary condition with if else

* Adding a buildheaders function to conditionally set content type and checking if body is null when serializing content

* Altering condition to be optimal

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding formdata to the node project, setting the esModuleInterop config as true for allowing import of npm modules, adding unit test for application/xhtml+xml content type post

* Adding a private query parsing function and more validations

* Adding tests for url parsing and comments to the private url parsing functions

* Adding more information in the return comments for functions returning the GraphRequest instance

* Adding unit test for serializecontent testing if content is null, changed content type setting for put and patch

* Changing the conditional expression to check for undefined or null headers

Co-authored-by: Mustafa Zengin <[email protected]>

* Adding the missing return

Co-authored-by: Mustafa Zengin <[email protected]>

* Removing the try catch block from the test case

* Removing the try catch block from the test case

* Returning if the content-type is present else setting content-type as default

* Uninstalling formdata, restoring the tsconfigs and removing the condition to check if form-data is undefined in GraphRequest.ts

* Restoring file

* Reverting the package json changes

* Bump yargs-parser from 13.1.1 to 13.1.2 in /samples/browser (#321)

Bumps [yargs-parser](https://github.com/yargs/yargs-parser) from 13.1.1 to 13.1.2.
- [Release notes](https://github.com/yargs/yargs-parser/releases)
- [Changelog](https://github.com/yargs/yargs-parser/blob/master/docs/CHANGELOG-full.md)
- [Commits](https://github.com/yargs/yargs-parser/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump mixin-deep from 1.3.1 to 1.3.2 in /scripts (#301)

Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Bump http-proxy from 1.17.0 to 1.18.1 in /samples/browser (#319)

Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.17.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](http-party/node-http-proxy@1.17.0...1.18.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update OneDriveLargeFileUploadTask.ts (#325)

* Update OneDriveLargeFileUploadTask.ts

Trying to upload files with the '#' or '%' character in the filename ends with network errors of the form -
400 status response "The parameter item does not exist in method getByPath" 

Encoding the entire URL does not encode URL components correctly. When the SDK's client tries to encode these URL components in the parameters on the call to OneDriveLargeFileUploadTask.create, then the resultant file in OneDrive has the URL encoded filename (as opposed to the user-friendly/decoded filename). Therefore, fix the encoding in the SDK's URL components itself, directly.

* Update OneDriveLargeFileUploadTask.ts

Fix typo

* Update src/tasks/OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Update OneDriveLargeFileUploadTask.ts

Updated comment

Co-authored-by: Mustafa Zengin <[email protected]>

* Use correct class name (#284)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Typo in documentation example. (#270)

Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: nikithauc <[email protected]>

* Enhancement/#311 page iterator request options (#318)

* Adding request options property to PageIterator

* Adding tests for page iterator task to test passing along the headers

* using headersinit type for headers

* Specifying parameter definition

* using constants

* Updating function documentation

* remove response type, test passing fetchoptions

* testing requestOptions set in pageiterator

* typos, optional parameters comments

* Sorting parameter list - chaoshandleroptions (#334)

* Client init with middleware array (#333)

* Passing midddleware array in client options

* Tests for middleware array

* Removing try catch

* ifnode condition,chain middleware test

* Adding missing exports

* Array initialization

Co-authored-by: Vincent Biret <[email protected]>

* merging with dev

* Using spread operator

* Checking if middleware is not empty

Co-authored-by: Vincent Biret <[email protected]>

* Make GraphError real Error (#335)

Co-authored-by: nikithauc <[email protected]>

* Using ternary shorthand, upgrade preview 2.1.0-2 (#337)

* Bump version to 2.1.0

* changing.substring parameter, comments to check middleware

* adding tests, urlotherqueryoptions type

Co-authored-by: Abhinav Srivastava <[email protected]>
Co-authored-by: muthurathinam <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: warreee <[email protected]>
Co-authored-by: Gideon Goldberg <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Behnam Mohammadi <[email protected]>
Co-authored-by: DeVere Dyett <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Michael Mainer <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Hari Sridharan <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: mattdenkers <[email protected]>
Co-authored-by: lewgordon <[email protected]>
Co-authored-by: Olivier Cuypers <[email protected]>

* Setting GraphError prototype explicity. Version 2.1.1 (#347)

Co-authored-by: Abrax20 <[email protected]>
Co-authored-by: Darrel <[email protected]>
Co-authored-by: Abhinav Srivastava <[email protected]>
Co-authored-by: muthurathinam <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: warreee <[email protected]>
Co-authored-by: Gideon Goldberg <[email protected]>
Co-authored-by: Muthurathinam <[email protected]>
Co-authored-by: Nikola Metulev <[email protected]>
Co-authored-by: Behnam Mohammadi <[email protected]>
Co-authored-by: DeVere Dyett <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: Michael Mainer <[email protected]>
Co-authored-by: Vincent Biret <[email protected]>
Co-authored-by: Hari Sridharan <[email protected]>
Co-authored-by: Mustafa Zengin <[email protected]>
Co-authored-by: mattdenkers <[email protected]>
Co-authored-by: lewgordon <[email protected]>
Co-authored-by: Olivier Cuypers <[email protected]>
@nikithauc nikithauc mentioned this pull request Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphError should extend Error
6 participants