# No Output after refactoring

**URL:** https://discourse.sst.dev/t/no-output-after-refactoring/1685
**Category:** General
**Created:** [March 21, 2020, 12:00am UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685 "2020-03-21T00:00:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)
#### Post date: [March 21, 2020, 12:00am UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/1 "2020-03-21T00:00:56Z")

</div>

After refactoring the code in create.js  
My serverless returns no output.  
Failure or not.  
Console.log is also not returning.

I’ve done SLS\_DEBUG=\* and it shows me nothing new.

Anyone else has had this problem?  
I even copy and pasted all the code in the tutorial.

I am using serverless version 1.67 (latest)  
and I am on OSX Mojave

---

<div class="post-metadata">

### Author: ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)
#### Post date: [March 21, 2020, 12:01am UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/2 "2020-03-21T00:01:54Z")

</div>

More info in the serverless forums:

> **[Serverless invoke local function with mock has no output](https://forum.serverless.com/t/serverless-invoke-local-function-with-mock-has-no-output/10845)**
>
> I am following this tutorial here: I’ve hit a wall where after I refactor my code I am not able to see the output anymore. Not even console.logs. Here is my serverless function for get: import \* as dynamoDbLib from "./libs/dynamodb-lib";...

---

<div class="post-metadata">

### Author: ![jeongwoo](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jeongwoo](https://discourse.sst.dev/u/jeongwoo)
#### Post date: [March 21, 2020, 11:49am UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/3 "2020-03-21T11:49:00Z")

</div>

so far, your code no problem. show serverles.yml, mocks/get-event.json code and inject console.log(error) in catch.

```auto
try {

} catch(error) {
    console.log(error)
}

```

---

<div class="post-metadata">

### Author: ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)
#### Post date: [March 21, 2020, 10:00pm UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/4 "2020-03-21T22:00:31Z")

</div>

I did that and nothing would show even when i purposefully failed it.

but it works now. i think something in my yaml must’ve been off cause after re-doing it that

---

<div class="post-metadata">

### Author: ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)
#### Post date: [March 30, 2020, 11:02pm UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/5 "2020-03-30T23:02:09Z")

</div>

That’s really weird. Did you figure out what caused it?

---

<div class="post-metadata">

### Author: ![stcalica](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/stcalica/32/794_2.png) [@stcalica](https://discourse.sst.dev/u/stcalica)
#### Post date: [April 7, 2020, 3:40am UTC](https://discourse.sst.dev/t/no-output-after-refactoring/1685/6 "2020-04-07T03:40:08Z")

</div>

nope never found it out. just started working.
