/**
 * A hook to manage the error generated by the API
 * @returns {{
 *   errors: Array<string>,
 *   processApiError: (error: ApiError) => void,
 *   clearErrors: () => void,
 * }} data provided by the hook
 */