error should return 500