I have developed simple posts endpoint and I do not know what to override and where to add status code. For example when some error happens I want to send 500 or when object created I want to send 201 instead of 200.
How and where to set status code in response of strapi?