add default statusCode to rest handler stop function