Add special handling for error message of 405 (including test)

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>