Skip to content
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

fix:[1] Unify error objects with GitHub errors. #36

Merged

Conversation

yuichi10
Copy link
Contributor

@yuichi10 yuichi10 commented Mar 4, 2021

Context

Scms are using different error objects and API does not handle GitLab error objects.
e.g. https://github.com/screwdriver-cd/screwdriver/blob/master/plugins/webhooks/index.js#L405

These errors should be handled by API.

Objective

  • Error object has status property instead of code property.

References

screwdriver-cd/screwdriver#2367
screwdriver-cd/scm-bitbucket#75

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@yuichi10 yuichi10 changed the title fix: Unify error objects with GitHub errors. fix:[1] Unify error objects with GitHub errors. Mar 4, 2021
@itleigns
Copy link
Contributor

itleigns commented Mar 5, 2021

Do we also need to check error.status here?

@itleigns
Copy link
Contributor

itleigns commented Mar 5, 2021

Same as above.

@kkisic
Copy link

kkisic commented Mar 5, 2021

Do we also need to check error.status here?

I fixed it.

@tkyi tkyi merged commit e8a4caf into screwdriver-cd:master Mar 8, 2021
@kkisic kkisic deleted the refact-error-response branch March 8, 2021 22:51
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.

4 participants