Merge lp://staging/~sinzui/lazr.restful/component-lookup-error-404 into lp://staging/lazr.restful
Status: | Merged |
---|---|
Approved by: | j.c.sackett |
Approved revision: | 207 |
Merged at revision: | 204 |
Proposed branch: | lp://staging/~sinzui/lazr.restful/component-lookup-error-404 |
Merge into: | lp://staging/lazr.restful |
Diff against target: |
173 lines (+64/-29) 4 files modified
src/lazr/restful/NEWS.txt (+5/-0) src/lazr/restful/publisher.py (+25/-26) src/lazr/restful/tests/test_navigation.py (+33/-2) src/lazr/restful/version.txt (+1/-1) |
To merge this branch: | bzr merge lp://staging/~sinzui/lazr.restful/component-lookup-error-404 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+138534@code.staging.launchpad.net |
Commit message
Convert API traversal ComponentLookup
Description of the change
An oops is reported when getPublishedSources distro_series has extra slash.
ComponentLo
This error happens in WebServicePubli
we expect to raise a NotFound error.
RULES
Pre-
* This error happens because it getResource assumes anything that
implements IEntry or IEntryField can be adapted to the underling
object to make the resource. This is not always true because
lazr.restful decorators declare parameter types.
* The method raises NotFound if nothing an be adapted, but since
it cannot be certain it's checks are correct, it needs to
watch for ComponentLookup
QA
On qastaging after it was updated to use lazr.restful 0.19.10
* Verify https:/
does not oops.
LINT
src/
src/
TEST
./bin/test -vc -t NavigationTestCase
IMPLEMENTATION
I wrapped the entire if-elif block in a try-except to convert the error
into a NotFound error.
src/
src/
Looks good.