support custom status code and message

fix #350
this assert seems unnecessary