-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/40 add error handling via notifications #125
Feature/40 add error handling via notifications #125
Conversation
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
src/types/gaiaXException.model.ts
Outdated
@@ -0,0 +1,2 @@ | |||
export type GaiaXExceptionType = 'BusinessException' | 'TechnicalException'; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -0,0 +1,11 @@ | |||
import { GaiaXExceptionType } from '../../types/gaiaXException.model'; | |||
|
|||
export abstract class GaiaXException extends Error { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
import { GaiaXExceptionType } from '../../types/gaiaXException.model'; | ||
|
||
export abstract class GaiaXException extends Error { | ||
abstract type: GaiaXExceptionType; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
export abstract class GaiaXException extends Error { | ||
abstract type: GaiaXExceptionType; | ||
|
||
protected constructor(message: string) { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
import { GaiaXExceptionType } from '../../types/gaiaXException.model'; | ||
|
||
export abstract class GaiaXException extends Error { | ||
abstract type: GaiaXExceptionType; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
src/types/notification.model.ts
Outdated
|
||
export interface Notification { | ||
messageType?: NotificationMessageType, | ||
message?: ToastContent; |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
|
||
const toastOptions = { | ||
...notification.options, | ||
autoClose: getAutoClose(notification.options ? notification.options.autoClose : undefined), |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
||
export const notify = (notification: Notification) => { | ||
|
||
function getAutoClose(autoClose: number | undefined | false): number | false { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
@@ -15,3 +15,7 @@ code { | |||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', | |||
monospace; | |||
} | |||
|
|||
body > iframe { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
super(message); | ||
} | ||
|
||
abstract handleNotification(addException?: () => void): void; |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
npm error peer uuid@"^3.4.0 || ^7.0.0 || ^8.0.0 || ^9.0.0" from [email protected] Signed-off-by: Keresztes Zsolt <[email protected]>
Signed-off-by: Keresztes Zsolt <[email protected]>
No description provided.