Open Bug 1929466 Opened 3 months ago Updated 1 month ago

landing jobs errors should return JSON objects

Categories

(Conduit :: Lando, defect, P3)

Tracking

(Not tracked)

People

(Reporter: shtrom, Assigned: shtrom)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Two landing jobs tests remain skipped after bug 1915712 https://github.com/mozilla-conduit/lando/blob/c56c9faf90b1e4bb80dbd89b2365d20313f0e37b/src/lando/api/tests/test_landing_job.py#L77-L102

This is due to the fact that those error paths do not return JsonResponse, but lead to exceptions getting thrown, which in turns get transformed via HTML views.

Assignee: nobody → omehani
Status: NEW → ASSIGNED

Two-stage fix:

  1. unskip the tests, but only check the HTTP status code (not the response body)
  2. fix the response body (either by replacing exceptions with JsonResponses, or updating the Exception view to return JSON rather than HTML)
Blocks: 1909315
No longer blocks: 1904082
Blocks: 1909722
No longer blocks: 1909315
Priority: -- → P3
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: