-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from shopgate/error-handling
PWA-299: Refactored / Implemented error handling.
- Loading branch information
Showing
39 changed files
with
1,803 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { | ||
APP_ERROR, | ||
PIPELINE_ERROR, | ||
} from '../../constants/ActionTypes'; | ||
|
||
/** | ||
* Creates the dispatched APP_ERROR action object. | ||
* @param {Object} error The error object. | ||
* @return {Object} The dispatched action object. | ||
*/ | ||
export const appError = error => ({ | ||
type: APP_ERROR, | ||
error, | ||
}); | ||
|
||
/** | ||
* Creates the dispatched PIPELINE_ERROR action object. | ||
* @param {Object} error The error object. | ||
* @return {Object} The dispatched action object. | ||
*/ | ||
export const pipelineError = error => ({ | ||
type: PIPELINE_ERROR, | ||
error, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { | ||
APP_ERROR, | ||
PIPELINE_ERROR, | ||
} from '../constants/ActionTypes'; | ||
import { main$ } from './main'; | ||
|
||
/** | ||
* Gets triggered when an app error is received. | ||
* @type {Observable} | ||
*/ | ||
export const appError$ = main$ | ||
.filter(({ action }) => action.type === APP_ERROR); | ||
|
||
/** | ||
* Gets triggered when an pipeline error is received. | ||
* @type {Observable} | ||
*/ | ||
export const pipelineError$ = main$ | ||
.filter(({ action }) => action.type === PIPELINE_ERROR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const DEFAULT_CONTEXT = '*'; | ||
export const SOURCE_APP = 'app'; | ||
export const SOURCE_PIPELINE = 'pipeline'; |
Oops, something went wrong.