Http code 500 was never returned as the string comparison was wrong