[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] 03/04: content
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] 03/04: content |
Date: |
Thu, 02 Dec 2021 19:25:44 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
commit b27854f1c3545cde6af4c659c248663d18eab94a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Dec 2 15:07:25 2021 -0300
content
---
packages/merchant-backoffice/src/InstanceRoutes.tsx | 13 +++++++++++--
packages/merchant-backoffice/src/components/menu/index.tsx | 7 ++++++-
packages/merchant-backoffice/src/utils/types.ts | 1 +
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/packages/merchant-backoffice/src/InstanceRoutes.tsx
b/packages/merchant-backoffice/src/InstanceRoutes.tsx
index aaf8de4..20a7601 100644
--- a/packages/merchant-backoffice/src/InstanceRoutes.tsx
+++ b/packages/merchant-backoffice/src/InstanceRoutes.tsx
@@ -121,16 +121,21 @@ export function InstanceRoutes({ id, admin,
setInstanceName }: Props): VNode {
[id, token, admin]
);
- const ServerErrorRedirectTo =
- (to: InstancePaths | AdminPaths) => (error: HttpError) => {
+ function ServerErrorRedirectTo(to: InstancePaths | AdminPaths) {
+ return function ServerErrorRedirectToImpl(error: HttpError) {
setGlobalNotification({
message: i18n`The backend reported a problem: HTTP status
#${error.status}`,
description: i18n`Diagnostic from ${error.info?.url} is
"${error.message}"`,
+ details:
+ error.clientError || error.serverError
+ ? error.error?.detail
+ : undefined,
type: "ERROR",
to,
});
return <Redirect to={to} />;
};
+ }
const LoginPageAccessDenied = () => (
<Fragment>
@@ -435,6 +440,10 @@ function AdminInstanceUpdatePage({
notification={{
message: i18n`The backend reported a problem: HTTP status
#${error.status}`,
description: i18n`Diagnostic from ${error.info?.url} is
"${error.message}"`,
+ details:
+ error.clientError || error.serverError
+ ? error.error?.detail
+ : undefined,
type: "ERROR",
}}
/>
diff --git a/packages/merchant-backoffice/src/components/menu/index.tsx
b/packages/merchant-backoffice/src/components/menu/index.tsx
index 0bf9412..0a621af 100644
--- a/packages/merchant-backoffice/src/components/menu/index.tsx
+++ b/packages/merchant-backoffice/src/components/menu/index.tsx
@@ -170,7 +170,12 @@ export function NotificationCard({
<div class="message-header">
<p>{n.message}</p>
</div>
- {n.description && <div class="message-body">{n.description}</div>}
+ {n.description && (
+ <div class="message-body">
+ <div>{n.description}</div>
+ {n.details && <pre>{n.details}</pre>}
+ </div>
+ )}
</article>
</div>
</div>
diff --git a/packages/merchant-backoffice/src/utils/types.ts
b/packages/merchant-backoffice/src/utils/types.ts
index 8e54c44..a3f23ac 100644
--- a/packages/merchant-backoffice/src/utils/types.ts
+++ b/packages/merchant-backoffice/src/utils/types.ts
@@ -23,6 +23,7 @@ export interface KeyValue {
export interface Notification {
message: string;
description?: string | VNode;
+ details?: string | VNode;
type: MessageType;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.