Don't crash if the query params are invalid json
This commit is contained in:
1 parent
57874acbfe
commit
7b2b89bb4a
1 file changed
+3
@@ -339,7 +339,10 @@ listener = (request, response) ->
|
||||
|
||||
func = (aliases) ->
|
||||
if urlParts.query.query?
|
||||
try
|
||||
q = JSON.parse(urlParts.query.query)
|
||||
catch e
|
||||
q = {}
|
||||
else
|
||||
q = {}
|
||||
q = query.expand(q, aliases) if collectionName is 'devices'
|
||||
|
||||
Reference in new issue
Block a user