Add 500 code to error