handle 405 error codes