guard against runtime panic in request handlers