Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers alert if client details update fails #1568

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/locale/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Lösung konnte nicht als verarbeitet markiert werden",
"TABLES_UNDEFINED": "Tabellen undefiniert",
"CONNECTION_UNDEFINED": "Verbindung undefiniert",
"COMMITMENT_FLAG_FAILED": "Verpflichtung konnte nicht als verarbeitet markiert werden"
"COMMITMENT_FLAG_FAILED": "Verpflichtung konnte nicht als verarbeitet markiert werden",
"UNKNOWN": "Unbekannter Datenbankfehler"
},
"CAPTCHA": {
"PARSE_ERROR": "Fehler beim Parsen des Captchas",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Failed to flag solution as processed",
"TABLES_UNDEFINED": "Tables undefined",
"CONNECTION_UNDEFINED": "Connection undefined",
"COMMITMENT_FLAG_FAILED": "Failed to flag commitment as processed"
"COMMITMENT_FLAG_FAILED": "Failed to flag commitment as processed",
"UNKNOWN": "Unknown database error"
},
"CAPTCHA": {
"PARSE_ERROR": "Error parsing captcha",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Error al marcar la solución como procesada",
"TABLES_UNDEFINED": "Tablas indefinidas",
"CONNECTION_UNDEFINED": "Conexión indefinida",
"COMMITMENT_FLAG_FAILED": "Error al marcar el compromiso como procesado"
"COMMITMENT_FLAG_FAILED": "Error al marcar el compromiso como procesado",
"UNKNOWN": "Error desconocido de base de datos"
},
"CAPTCHA": {
"PARSE_ERROR": "Error al analizar el captcha",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Échec du marquage de la solution comme traitée",
"TABLES_UNDEFINED": "Tables non définies",
"CONNECTION_UNDEFINED": "Connexion non définie",
"COMMITMENT_FLAG_FAILED": "Échec du marquage de l'engagement comme traité"
"COMMITMENT_FLAG_FAILED": "Échec du marquage de l'engagement comme traité",
"UNKNOWN": "Erreur de base de données inconnue"
},
"CAPTCHA": {
"PARSE_ERROR": "Erreur d'analyse du captcha",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Impossibile contrassegnare la soluzione come elaborata",
"TABLES_UNDEFINED": "Tabelle indefinite",
"CONNECTION_UNDEFINED": "Connessione indefinita",
"COMMITMENT_FLAG_FAILED": "Impossibile contrassegnare l'impegno come elaborato"
"COMMITMENT_FLAG_FAILED": "Impossibile contrassegnare l'impegno come elaborato",
"UNKNOWN": "Errore database sconosciuto"
},
"CAPTCHA": {
"PARSE_ERROR": "Errore nell'analisi del captcha",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Falha ao marcar a solução como processada",
"TABLES_UNDEFINED": "Tabelas indefinidas",
"CONNECTION_UNDEFINED": "Conexão indefinida",
"COMMITMENT_FLAG_FAILED": "Falha ao marcar o compromisso como processado"
"COMMITMENT_FLAG_FAILED": "Falha ao marcar o compromisso como processado",
"UNKNOWN": "Erro de banco de dados desconhecido"
},
"CAPTCHA": {
"PARSE_ERROR": "Erro ao analisar o captcha",
Expand Down
3 changes: 2 additions & 1 deletion packages/locale/src/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
"SOLUTION_FLAG_FAILED": "Falha ao marcar a solução como processada",
"TABLES_UNDEFINED": "Tabelas indefinidas",
"CONNECTION_UNDEFINED": "Conexão indefinida",
"COMMITMENT_FLAG_FAILED": "Falha ao marcar o compromisso como processado"
"COMMITMENT_FLAG_FAILED": "Falha ao marcar o compromisso como processado",
"UNKNOWN": "Erro de banco de dados desconhecido"
},
"CAPTCHA": {
"PARSE_ERROR": "Erro ao analisar o captcha",
Expand Down
8 changes: 6 additions & 2 deletions packages/provider/src/tasks/client/clientTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

import { validateAddress } from "@polkadot/util-crypto/address";
import type { Logger } from "@prosopo/common";
import { type Logger, ProsopoApiError } from "@prosopo/common";
import { CaptchaDatabase, ClientDatabase } from "@prosopo/database";
import {
type IUserSettings,
Expand Down Expand Up @@ -191,7 +191,11 @@ export class ClientTaskManager {
},
);
} catch (e: unknown) {
this.logger.error(e);
const getClientListError = new ProsopoApiError("DATABASE.UNKNOWN", {
context: { error: e },
logger: this.logger,
});
this.logger.error(getClientListError, { context: { error: e } });
await this.providerDB.updateScheduledTaskStatus(
taskID,
ScheduledTaskStatus.Failed,
Expand Down
Loading