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: return 403/404 error when stop events with mismatched scm host #3071

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

y-oksaku
Copy link
Contributor

@y-oksaku y-oksaku commented Mar 27, 2024

Context

SD API returns 500 error when user logged in mismatch SCM host stops events.

{
    "statusCode": 500,
    "error": "Internal Server Error",
    "message": "Pipeline's scmHost xxx.com does not match with user's scmHost yyy.com"
}

But in this case, API should return 403 error (or 404 when private pipeline).

Objective

Add error handling same as #2655

References

#2655

License

I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@y-oksaku y-oksaku marked this pull request as ready for review March 27, 2024 00:31
@coveralls
Copy link

coveralls commented Mar 27, 2024

Coverage Status

coverage: 95.228% (+0.007%) from 95.221%
when pulling d175696 on sonic-screwdriver-cd:fix-status-code
into 3639673 on screwdriver-cd:master.

@tkyi tkyi merged commit 0ee01ce into screwdriver-cd:master Mar 28, 2024
2 checks passed
@y-oksaku y-oksaku deleted the fix-status-code branch March 28, 2024 22:54
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.

None yet

6 participants