fixes some edge cases where the correct error wasn't being raised (in these cases, a 404) when they were clearly 404s