Cached events lose their original status code

Description

If I have a cached event that returns something like a 404 status code or 403, that status code doesn't get used when the event is pulled from cache and instead returns 203, which is in the "success" family. This is especially frustrating when working with a service that doesn't recognize 203 and thinks it's a failure!

Preserve the actual status code that was used in the cached event. To do this, you'll probably need to stop defaulting the status code to 200 in the render data call so you can tell whether a status code was explicitly set or not. The developers didn't set an explicit status code, then it's probably fine to use 203 for cached events, but if the dev returned 404 on purpose, then that needs to be preserved.

Activity

Show:
Brad Wood
March 3, 2018, 9:05 PM

I used this workaround to re-set the status code to what it needed to be:

Fixed

Assignee

Luis Majano

Reporter

Brad Wood

Labels

None

Components

Fix versions

Priority

Major
Configure