craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
286 stars 140 forks source link

Webhook should send error status code on wrong passkey #1408

Open tricki opened 4 months ago

tricki commented 4 months ago

Description

When trying to call a feed's webhook with a wrong passphrase, the response is HTML and has a 200 status code. To make it easier to detect such errors, an error status code such as 401 should be returned.

Ideally the response would also respect the "Accepts" header and send JSON when requested.

Steps to reproduce

  1. Create an import
  2. Call its webhook with a wrong or missing passkey.

Additional info