From: Jane Sandberg Date: Tue, 26 Mar 2019 20:43:54 +0000 (-0700) Subject: throw error if no patron found X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=cee64e613ba99ee5faf3984b3557ac3a9e5db79e;p=working%2FEvergreen.git throw error if no patron found --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/patron.service.ts b/Open-ILS/src/eg2/src/app/staff/share/patron.service.ts index 08f66c1ed3..4d29cc6161 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/patron.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/patron.service.ts @@ -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()); } }