- context = afb_hreq_context(hreq);
- afb_apis_call(afb_hreq_to_req(hreq), context, api, lenapi, verb, lenverb);
+ if (afb_hreq_init_context(hreq) < 0)
+ afb_hreq_reply_error(hreq, MHD_HTTP_INTERNAL_SERVER_ERROR);
+ else
+ afb_apis_call(afb_hreq_to_req(hreq), &hreq->context, api, lenapi, verb, lenverb);