OpenSRF returns 200 status when calling APIs that don't exist

Bug #1928339 reported by Jason Boyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
Confirmed
Undecided
Unassigned
3.2
Confirmed
Undecided
Unassigned

Bug Description

I believe all current versions do this.

If you use the html gateway to make an api call and there's no handler you will get an empty payload back with a 200 status. This is very misleading and can lead developers to think there's a problem with their params rather than the call itself or a service's public registration.

For example, calling something like open-ils.notfound should return a 404:
https://demo.evergreencatalog.com/osrf-gateway-v1?service=open-ils.notfound&method=ghost.like.swayze&param=%22Boo%22
But instead we get this:
{"payload":[],"status":200}

I don't think the actual http status should be 404 but OpenSRF certainly should use that status in this case.

There will need to be some care in how this is addressed since the Evergreen Version call:
https://demo.evergreencatalog.com/osrf-gateway-v1?service=open-ils.circ&method=opensrf.open-ils.system.ils_version
isn't actually published in any service.

Tags: pullrequest
Bill Erickson (berick)
Changed in opensrf:
assignee: nobody → Bill Erickson (berick)
Revision history for this message
Bill Erickson (berick) wrote :
tags: added: pullrequest
Changed in opensrf:
milestone: none → 3.3-beta
assignee: Bill Erickson (berick) → nobody
status: New → Confirmed
Galen Charlton (gmc)
Changed in opensrf:
milestone: 3.3-beta → 3.3.0
Galen Charlton (gmc)
Changed in opensrf:
milestone: 3.3.0 → 3.3.1
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.