![]() |
Hi,
I have created a filter to trigger a process After a controller. My controller (below) is very simple. Essentially, the controller receives data from an external source (webhook), assigns a variable to the data, and returns an HTTP 200 (Success) to the external server. PHP Code: namespace App\Controllers; After the above controller, the filter is executing perfectly, and running my process (below). My process (below) obviously fails as $bar does not exist, PHP Code: use CodeIgniter\Model; In this instance, Codeigniter is returning an HTTP 500 response to the external server, instead of the HTTP 200 as defined in the controller. I do not understand how this is possible as I should have already returned HTTP 200 from the controller, and my process (Updater) should only be called AFTER the controller has finished, is this correct? If this is not correct, is there a way to respond with HTTP 200 from the controller (this would be correct as I have received the data), and then process the data, handling any subsequent errors (data or framework) in alternative ways? Many Thanks, |
Messages In This Thread |
Filter - Return response error - by 68thorby68 - 08-26-2024, 03:54 AM
RE: Filter - Return response error - by seunex - 08-26-2024, 03:04 PM
RE: Filter - Return response error - by kenjis - 08-26-2024, 03:46 PM
RE: Filter - Return response error - by 68thorby68 - 09-11-2024, 06:08 AM
RE: Filter - Return response error - by ozornick - 09-11-2024, 06:37 AM
RE: Filter - Return response error - by kenjis - 09-11-2024, 06:25 PM
RE: Filter - Return response error - by 68thorby68 - 09-13-2024, 09:25 AM
|