Ajustes final etapa1 #69
@@ -89,9 +89,20 @@
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : 'Erro ao buscar produto';
|
||||
if (mostrarMensagemSucesso) {
|
||||
mostrarMensagem('error', message);
|
||||
const errorMessage = err instanceof Error ? err.message : 'Erro ao buscar produto';
|
||||
|
||||
// Verificar se é erro de função não encontrada
|
||||
if (errorMessage.includes('Could not find public function')) {
|
||||
const message = 'Servidor Convex precisa ser reiniciado. A função de busca por código de barras não foi encontrada.';
|
||||
if (mostrarMensagemSucesso) {
|
||||
mostrarMensagem('error', message);
|
||||
}
|
||||
console.error('Erro: Servidor Convex precisa ser reiniciado para reconhecer a nova função buscarMaterialPorCodigoBarras');
|
||||
} else {
|
||||
const message = errorMessage;
|
||||
if (mostrarMensagemSucesso) {
|
||||
mostrarMensagem('error', message);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
buscandoProduto = false;
|
||||
|
||||
2
packages/backend/convex/_generated/api.d.ts
vendored
2
packages/backend/convex/_generated/api.d.ts
vendored
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
import type * as acoes from "../acoes.js";
|
||||
import type * as actions_buscarInfoProduto from "../actions/buscarInfoProduto.js";
|
||||
import type * as actions_email from "../actions/email.js";
|
||||
import type * as actions_linkPreview from "../actions/linkPreview.js";
|
||||
import type * as actions_pushNotifications from "../actions/pushNotifications.js";
|
||||
@@ -106,6 +107,7 @@ import type {
|
||||
|
||||
declare const fullApi: ApiFromModules<{
|
||||
acoes: typeof acoes;
|
||||
"actions/buscarInfoProduto": typeof actions_buscarInfoProduto;
|
||||
"actions/email": typeof actions_email;
|
||||
"actions/linkPreview": typeof actions_linkPreview;
|
||||
"actions/pushNotifications": typeof actions_pushNotifications;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use node';
|
||||
|
||||
import { action } from '../_generated/server';
|
||||
import { v } from 'convex/values';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user