snapd return 500 error when using /v2/find?name= with unknown snap

Bug #1659149 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Medium
John Lenton

Bug Description

If you do a find for a named snap that doesn't exist the server returns a 500 error. It seems more appropriate to return a 404 in this case.

$ sudo nc -C -U /run/snapd.socket
GET /v2/find?name=unknown HTTP/1.1
Host:

HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Date: Wed, 25 Jan 2017 00:25:06 GMT
Content-Length: 105

{"type":"error","status-code":500,"status":"Internal Server Error","result":{"message":"snap not found"}}

John Lenton (chipaca)
Changed in snappy:
assignee: nobody → John Lenton (chipaca)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
John Lenton (chipaca) wrote :
John Lenton (chipaca)
Changed in snappy:
status: In Progress → Fix Committed
Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.