handles invalid request paths. Closes #1264