# Slim 3 upgrade to 4

**URL:** <https://discourse.slimframework.com/t/slim-3-upgrade-to-4/3782>\
**Category:** Questions\
**Created:** [January 7, 2020, 5:52pm UTC](https://discourse.slimframework.com/t/slim-3-upgrade-to-4/3782 "2020-01-07T17:52:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elvisreis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/elvisreis/32/1298_2.png) [@elvisreis](https://discourse.slimframework.com/u/elvisreis)\
**Post date:** [January 7, 2020, 5:52pm UTC](https://discourse.slimframework.com/t/slim-3-upgrade-to-4/3782/1 "2020-01-07T17:52:07Z")

</div>

In Slim 3 I set the error code and the message, I’m migrated to version 4, and it seems that the **withStatus** method doesn’t give me the function to set the **write**

```auto
function discover(Request $request, Response $response, $args)
{
        return $response->withStatus(403)->write('.....');
}

```
