8000 Add the response error by w3nl · Pull Request #100 · trojs/error · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add the response error #100

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
Nov 27, 2024
Merged

Add the response error #100

merged 2 commits into from
Nov 27, 2024

Conversation

w3nl
Copy link
Contributor
@w3nl w3nl commented Nov 27, 2024

No description provided.

@w3nl w3nl requested a review from Copilot November 27, 2024 10:12
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 suggestion.

Files not reviewed (1)
  • package.json: Language not supported
Comments skipped due to low confidence (2)

src/tests/response-error.unit.js:21

  • The status code should be 502 as per the ResponseError class.
assert.deepEqual(error.status, 400)

src/response-error.js:18

  • [nitpick] The method name get errorStatus() should be renamed to get status() for consistency.
get errorStatus() {

assert.deepEqual(error.value.values.status, 400)
assert.deepEqual(error.value.values.type, Error)
assert.deepEqual(error.value.values.value, 'test')
assert.deepEqual(error.status, 500)
Copy link
Preview
Copilot AI Nov 27, 2024

Choose a reason for hiding this comment

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

The status code should be 502 as per the ResponseError class.

Suggested change
assert.deepEqual(error.status, 500)
assert.deepEqual(error.status, 502)

Copilot uses AI. Check for mistakes.

@w3nl w3nl requested a review from Copilot November 27, 2024 10:17
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 6 changed files in this pull request and generated no suggestions.

Files not reviewed (1)
  • package.json: Language not supported
Comments skipped due to low confidence (2)

src/tests/response-error.unit.js:8

  • The test description is redundant. It should be updated to 'should create a Response error'.
it('It should create a Response error', () => {

src/tests/response-error.unit.js:29

  • The test description is redundant. It should be updated to 'should handle invalid error values'.
it('It should handle invalid error values', () => {

@w3nl w3nl merged commit 0a28dec into main Nov 27, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0