Support Forums

Plugin error...netlify-purge-cloudflare-on-deploy and netlify-plugin-gmail failed but the deploy was able to complete

netlify-purge-cloudflare-on-deploy and netlify-plugin-gmail failed but the deploy was able to complete.

Welcome to the forums @pravin

Can you provide a little more information. Is there information about the failure in the build logs you could share so the community can help resolve the issue?

Hi, @pravin. Netlify didn’t write either of those plugins but I can explain why they didn’t fail the build.

Both of the plugins you are using are configured to use the onSuccess event. Our docs page on creating build plugins explains that this even type can never fail a build. Quoting that page:

  • onSuccess : runs when the deploy succeeds. Can’t be used to prevent a build from being deployed.

So, to correct this issue, the authors of those build plugins will need to change which event they tie into (onPostBuild being the likely best choice). They would also need to detect failures and report that the deploy should be cancel when those conditions occur.

The documentation on how a plugin can fail a build is found in the “Error Reporting” section of the same page above.

Note, both plugins are written by third-parties and not by Netlify:


If you would like to see those plugins improved you might file an issue on the repo asking for the fix or make the changes yourself and submit PRs to have those changes merged.

Alternatively, if you want to make the changes yourself, both repos have open source licenses. This means you can fork the repos and just make the changes you want to see yourself if you prefer. You would then install your forked version of the repos to utilize the new behavior.

If there are other questions about this, please let us know.

1 Like