make function afb_context_set return a status