throw error if no patron found
authorJane Sandberg <sandbej@linnbenton.edu>
Tue, 26 Mar 2019 20:43:54 +0000 (13:43 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Tue, 26 Mar 2019 21:06:42 +0000 (14:06 -0700)
Open-ILS/src/eg2/src/app/staff/share/patron.service.ts

index 08f66c1..4d29cc6 100644 (file)
@@ -1,7 +1,8 @@
 import {Injectable} from '@angular/core';
 import {NetService} from '@eg/core/net.service';
 import {AuthService} from '@eg/core/auth.service';
-import {Observable} from 'rxjs';
+import {Observable, throwError} from 'rxjs';
+import {single} from 'rxjs/operators';
 
 
 @Injectable()
@@ -16,7 +17,7 @@ export class PatronService {
             'open-ils.actor',
             'open-ils.actor.get_barcodes',
             this.auth.token(), this.auth.user().ws_ou(),
-            'actor', barcode);
+           'actor', barcode).pipe(single());
     }
 
 }