export function getApiErrorMessage(err, fallback = "Request failed") {
  const data = err?.response?.data;
  if (data?.message) {
    return data.details ? `${data.message}: ${data.details}` : data.message;
  }
  return err?.message || fallback;
}
