# Ember mirage: 'cannot read property 'get' of undefined'?

**URL:** <https://discuss.emberjs.com/t/ember-mirage-cannot-read-property-get-of-undefined/15490>\
**Category:** Uncategorized\
**Created:** [September 17, 2018, 1:15pm UTC](https://discuss.emberjs.com/t/ember-mirage-cannot-read-property-get-of-undefined/15490 "2018-09-17T13:15:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregWeb](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/gregweb/32/13583_2.png) [@GregWeb](https://discuss.emberjs.com/u/GregWeb)\
**Post date:** [September 17, 2018, 1:15pm UTC](https://discuss.emberjs.com/t/ember-mirage-cannot-read-property-get-of-undefined/15490/1 "2018-09-17T13:15:25Z")

</div>

I have an existing app and tried to get mirage working with it.

```
export default function () {
this.namespace = '/api/v0';   
  this.timing = 2000;  
  this.get('/accounts', function () {
    console.log("yoooooooooo");
    return{
      users: [
        { id: '1', email: 'joe@myapp.io' },
        { id: '2', email: 'mark@myapp.io' },
      ]
    };
  });

  this.post('/api/login', function(req, res) {
    res.send({
      id: '1',
      token: 'token',
      email: req.body.email,
      isAdmin: true
    })
  }

```

In Chrome inspector the console log is outputted, but I get errors:

 ![image](https://us1.discourse-cdn.com/flex019/uploads/emberjs_public/original/3X/b/2/b26902adf702ea1def9ce749e6dd8ce21a8446aa.png)

What is this “raven” error? and what is the undefined error trying to tell me?

---

<div class="post-metadata">

**Author:** ![esbanarango](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/esbanarango/32/10210_2.png) [@esbanarango](https://discuss.emberjs.com/u/esbanarango)\
**Post date:** [September 17, 2018, 2:38pm UTC](https://discuss.emberjs.com/t/ember-mirage-cannot-read-property-get-of-undefined/15490/2 "2018-09-17T14:38:23Z")

</div>

Are you using [Sentry](https://docs.sentry.io/clients/javascript/)? For the first error you may be missing some configuration keys for the Sentry integration.

> Raven.js is the official browser JavaScript client for Sentry.

The second one, `Cannot read property 'get' of undefined`. That’s pointing to the `model` hook on one of your routes. You can click on the second row `at Class.model (route.js:14)` and see which route it is. You may be trying to access a property on sometime that could be `undefined`. You can paste that route file here and we can take a look.

---

<div class="post-metadata">

**Author:** ![GregWeb](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/gregweb/32/13583_2.png) [@GregWeb](https://discuss.emberjs.com/u/GregWeb)\
**Post date:** [September 18, 2018, 6:42am UTC](https://discuss.emberjs.com/t/ember-mirage-cannot-read-property-get-of-undefined/15490/3 "2018-09-18T06:42:19Z")

</div>

Thanks I was simply not passing in the correct data. Trying to mock a a full-fledged backend that I had no hand in developing and that has little documentation. Which leads to simple errors like that?
