Add match case for rest_init return {halt, Req, HandlerState}

When you call rest_init often occurs formairovanie State and its parsing or processing. And if parsing fails want to give back to the client and to complete further processing.