fix in command handler based commands for errors.
This commit is contained in:
parent
4a7efb1d93
commit
58306aee76
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@poweredsoft/ngx-data",
|
"name": "@poweredsoft/ngx-data",
|
||||||
"version": "0.0.21",
|
"version": "0.0.22",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": "^8.2.4",
|
"@angular/common": "^8.2.4",
|
||||||
"@angular/core": "^8.2.4",
|
"@angular/core": "^8.2.4",
|
||||||
|
@ -91,7 +91,7 @@ export abstract class BaseHttpDataSourceOptionsBuilder<TModel, TKey> {
|
|||||||
|
|
||||||
public addCommandByCallback<TCommand, TCommandResult>(name: string, commandHandler: (command: TCommand) => Observable<TCommandResult>, resolveCommandModel?: (event: IResolveCommandModelEvent<TModel>) => Observable<TCommand & any>) {
|
public addCommandByCallback<TCommand, TCommandResult>(name: string, commandHandler: (command: TCommand) => Observable<TCommandResult>, resolveCommandModel?: (event: IResolveCommandModelEvent<TModel>) => Observable<TCommand & any>) {
|
||||||
const handleWrapper = command => {
|
const handleWrapper = command => {
|
||||||
return commandHandler(command).pipe(catchError(err => this._handleErrorPipe.bind(this)));
|
return commandHandler(command).pipe(catchError(this._handleErrorPipe.bind(this)));
|
||||||
};
|
};
|
||||||
|
|
||||||
this._commands[name] = <IDataSourceCommandAdapterOptions<TModel>>{
|
this._commands[name] = <IDataSourceCommandAdapterOptions<TModel>>{
|
||||||
|
Loading…
Reference in New Issue
Block a user