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

Feature/40 add error handling via notifications #125

Merged
merged 15 commits into from
Nov 14, 2024

Conversation

zsoltker
Copy link
Contributor

@zsoltker zsoltker commented Nov 5, 2024

No description provided.

@zsoltker zsoltker requested a review from devbysp November 5, 2024 13:06
@@ -0,0 +1,2 @@
export type GaiaXExceptionType = 'BusinessException' | 'TechnicalException';

This comment was marked as resolved.

@@ -0,0 +1,11 @@
import { GaiaXExceptionType } from '../../types/gaiaXException.model';

export abstract class GaiaXException extends Error {

This comment was marked as resolved.

import { GaiaXExceptionType } from '../../types/gaiaXException.model';

export abstract class GaiaXException extends Error {
abstract type: GaiaXExceptionType;

This comment was marked as resolved.

export abstract class GaiaXException extends Error {
abstract type: GaiaXExceptionType;

protected constructor(message: string) {

This comment was marked as resolved.

import { GaiaXExceptionType } from '../../types/gaiaXException.model';

export abstract class GaiaXException extends Error {
abstract type: GaiaXExceptionType;

This comment was marked as resolved.


export interface Notification {
messageType?: NotificationMessageType,
message?: ToastContent;

This comment was marked as duplicate.


const toastOptions = {
...notification.options,
autoClose: getAutoClose(notification.options ? notification.options.autoClose : undefined),

This comment was marked as resolved.


export const notify = (notification: Notification) => {

function getAutoClose(autoClose: number | undefined | false): number | false {

This comment was marked as resolved.

@@ -15,3 +15,7 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

body > iframe {

This comment was marked as resolved.

super(message);
}

abstract handleNotification(addException?: () => void): void;

This comment was marked as resolved.

@devbysp
Copy link
Contributor

devbysp commented Nov 12, 2024

Please write tests except for these files (add this comment /* test coverage not required */ add the beginning of the files in order to not be included in the test coverage.):

  • src/index.js
  • src/types/exception.model.ts
  • src/types/notification.model.ts

image

       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]>
@zsoltker zsoltker requested a review from devbysp November 13, 2024 14:17
@zsoltker zsoltker removed the request for review from Huber-David November 14, 2024 12:36
@zsoltker zsoltker merged commit 0e69628 into main Nov 14, 2024
3 checks passed
@zsoltker zsoltker deleted the feature/40-add-error-handling-via-notifications branch November 14, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants