this is my code:
this._api.getCompanies().subscribe( res => this.companies = JSON.parse(res), exception => {if(this._api.responseErrorProcess(exception)) {
if an exception occurs, it will be sent to the function in the API, and then true will be returned if the problem is fixed (for example, the token has been updated), and it just needs to try again after fixing
I could not figure out how to do this.
source share