CREATE FUNCTION _api.raise_not_found()
RETURNS BOOLEAN
LANGUAGE plpgsql VOLATILE
AS $BODY$
BEGIN
	PERFORM _api.raise(
		_msg => 'api_not_found',
		_err => 404
	);

	RETURN TRUE;
END
$BODY$;

GRANT EXECUTE ON FUNCTION _api.raise_not_found()
	TO rest_anon, rest_user;
