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

Triage Service exceptions: validation error (/origins) #30

Open
grvillic opened this issue Mar 12, 2020 · 1 comment
Open

Triage Service exceptions: validation error (/origins) #30

grvillic opened this issue Mar 12, 2020 · 1 comment
Assignees

Comments

@grvillic
Copy link

grvillic commented Mar 12, 2020

The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.

It is likely that this is not something we want to be logging as an exception, but I am not certain what is the expected outcome.

requests 
| where resultCode == 500
| join (
 exceptions
 ) on operation_Id 
| extend pathPrefix = extract("/(\\w+)", 0, tostring(operation_Name))
| summarize count() by  outerMessage, pathPrefix
| order by count_  desc 
| where outerMessage contains "Validation Failed" 
@grvillic grvillic changed the title Triage Service exceptions: "origins" validation error Triage Service exceptions: validation error (/origins) Mar 12, 2020
@jeffmendoza jeffmendoza self-assigned this Mar 13, 2020
@jeffmendoza
Copy link
Member

Looks like we are getting bad requests to this route:
https://github.com/clearlydefined/service/blob/master/routes/originGitHub.js#L56

The request is "GET /origins/github/https:/Github.com/ " It is suppsoed to be "get /origins/github/:user/:repo"

Either/or we should:

  • Validate input before turning around and sending the search request to GitHub. In that case this is a bug for the service
  • Catch and log exceptions from the GitHub client, but do not throw. In that case this is a "silence" issue.

In either case we should probably return a 400 to the caller.

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

No branches or pull requests

2 participants