This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Add more information to error messages
ClosedPublic

Authored by kpdev42 on Oct 26 2021, 3:57 AM.

Details

Summary

Add some useful information to HTTP errors with codes 400 and 404 to make it easier to understand which argument is missing or incorrect.

Diff Detail

Repository
rLNT LNT

Event Timeline

kpdev42 created this revision.Oct 26 2021, 3:57 AM
thopre added inline comments.Oct 26 2021, 4:00 AM
lnt/server/ui/views.py
817–819

Is it still the case, I remember a patch that wanted to allow arbitrary strings

kpdev42 added inline comments.Oct 26 2021, 4:16 AM
lnt/server/ui/views.py
817–819

AFAIK, yes, URL is expected to contain something like ?plot.0=1.2.3 . If you can point to a patch, which allows arbitrary string, it would be useful and I'll change this part

slydiman added inline comments.Oct 26 2021, 4:18 AM
lnt/server/ui/views.py
817–819

It is just a copy of the line 1716. The same is in the line 855.

cmatthews accepted this revision.Oct 26 2021, 12:04 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Oct 26 2021, 12:04 PM
thopre added inline comments.Oct 26 2021, 1:46 PM
lnt/server/ui/views.py
817–819

I was thinking of https://reviews.llvm.org/D109577, I don't know if it's related to the value here.

cmatthews added inline comments.Oct 26 2021, 1:55 PM
lnt/server/ui/views.py
817–819

They are separate. This one is the data lookup used internally to resolve a particular data set; where as, the one int the review is the order format, which is used for x-axis and change-over-time calculations.

thopre added inline comments.Oct 26 2021, 2:01 PM
lnt/server/ui/views.py
817–819

LGTM too then

This revision was automatically updated to reflect the committed changes.