Usman/lms11189 user api middleware exception 2

LMS-11189

#4670 with another commit
Wouldn't it make sense to test that we get the proper `HttpResponse.status_code` here?  Just checking that the context is empty doesn't seem like enough to me.