feat(F-056): completed feature
This commit is contained in:
@@ -75,8 +75,12 @@ export default function CheckoutClient() {
|
||||
notes: form.notes,
|
||||
}),
|
||||
});
|
||||
if (res.status === 401) {
|
||||
setError('Debes iniciar sesión para finalizar el pedido.');
|
||||
return;
|
||||
}
|
||||
if (!res.ok) {
|
||||
const data = await res.json();
|
||||
const data = await res.json().catch(() => ({}));
|
||||
throw new Error(data.error?.message || 'Error al procesar el pedido');
|
||||
}
|
||||
const { orderId } = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user