mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ACA-2734] Fix API - Return an error in case the response isn't a json (#5622)
* Return an error in case the response isn't a json * fix comma
This commit is contained in:
parent
e56331fecb
commit
e53c46464b
@ -63,6 +63,12 @@ export class DiscoveryApiService {
|
||||
public getBPMSystemProperties(): Observable<SystemPropertiesRepresentation> {
|
||||
return from(this.systemPropertiesApi.getProperties())
|
||||
.pipe(
|
||||
map( (res) => {
|
||||
if ('string' === typeof(res)) {
|
||||
throw new Error('Not valid response');
|
||||
}
|
||||
return res;
|
||||
}),
|
||||
catchError((err) => throwError(err.error))
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user