Open Bug 1569654 Opened 6 years ago Updated 5 years ago

Better 403 error

Categories

(Tree Management :: Treeherder: API, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: ekyle, Unassigned)

Details

In order to promote good citizenship, the Treeherder APIs (well, at least https://treeherder.mozilla.org/api/project/mozilla-central/performance/signatures) will respond with 403 error if the default Python requests headers are detected. This is confusing, because browser requests and curl requests work, but a simple Python implementation does not.

Please include the reason for the 403 error in the response. Maybe something along the lines of

Please set your "User-Agent" header to something unique so we may identify your project.

Priority: -- → P5

Can I fix this. Also please guide me how to proceed on this ?

(In reply to Shivansh Srivastava from comment #1)

Can I fix this. Also please guide me how to proceed on this ?

Most of the work is finding where the 403 is coming from. You can look for "403" in the codebase, or make a small python program to call https://treeherder.mozilla.org/api/project/mozilla-central/performance/signatures and see if there are any hints there

You need to log in before you can comment on or make changes to this bug.