Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help to request response error and in pass in success always #279

Closed
Paul75 opened this issue Mar 14, 2018 · 0 comments
Closed

help to request response error and in pass in success always #279

Paul75 opened this issue Mar 14, 2018 · 0 comments

Comments

@Paul75
Copy link

Paul75 commented Mar 14, 2018

Hello,

Only a question I do a service that post to server. I go respnde for exemple 404 or another than 200 and in sucribe it not pass in err ! always to success ?

sendMessage(code: any, mail: any) {
    this.loadingVisible = true;

    console.log('J\'ai cliqué sur => ' + code);


    this.actionsService.sendMailRappel(code, mail).subscribe(
      res => {
        this.loadingVisible = false;
        notify({
          position: 'center',
          message: 'Envoi du MAIL et du SMS effectué',
          maxWidth: '250'
        }, 'success', 600);
      },
      **err => {
        this.loadingVisible = false;
        notify({
          position: 'center',
          message: 'Erreur lors du changement du status',
          maxWidth: '300'
        }, 'error', 600);
      }**
    );
  }

an idee ?

@Paul75 Paul75 changed the title hep to request response erro and in pass in success always help to request response error and in pass in success always Mar 14, 2018
@Paul75 Paul75 closed this as completed Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant