# Application stopped when delete list of records

**URL:** https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013
**Category:** Help me!
**Created:** [February 22, 2023, 3:48am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013 "2023-02-22T03:48:16Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [February 22, 2023, 3:48am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/1 "2023-02-22T03:48:16Z")

</div>

## Feature(s) impacted

Routes delete list of records

## Observed behavior

Forest admin stop the running process when try to delete list of records that still have relation attached to another tables

this is the routes:

![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/optimized/2X/9/9093b22876ca2bc38b0f1a66f57408793beffc15_2_690x62.png)

## Expected behavior

Return error but without exit process (application stoped)

## Failure Logs

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/5/5e1618cdd03604290509a182874271e4f4162f94.jpeg)

 ![Wed Feb 22 10:24:29 AM WIB 2023](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/d358bd2b1a608313e57ac4a7a60c34bcfe62a6b8.png)

## Context

- Project name: Siklus
- Team name: Siklus
- Environment name: Staging
- Agent type & version: express
- Recent changes made on your end if any: no changes

---

<div class="post-metadata">

### Author: ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)
#### Post date: [February 22, 2023, 7:13am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/2 "2023-02-22T07:13:22Z")

</div>

Hello @umar006,

Can you please share with us the exact version of `forest-express-sequelize` that you are using on your project?

---

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [February 22, 2023, 7:25am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/3 "2023-02-22T07:25:35Z")

</div>

sure, “forest-express-sequelize”: “^7.11.3”

---

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [February 23, 2023, 1:46am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/4 "2023-02-23T01:46:12Z")

</div>

Hello @GuillaumeGautreau

is there any update about this issue?

thank you

---

<div class="post-metadata">

### Author: ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)
#### Post date: [February 23, 2023, 8:30am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/6 "2023-02-23T08:30:13Z")

</div>

Hello @umar006,

I tried to reproduce your exact issue, with `forest-express-sequelize@7.11.3` (the exact version) and the process did not halt as you described.

Can you check in your `package-lock.json` or `yarn.lock` file to get the exact version that is installed in your case?

I also tested with the latest v7 and could not reproduce the issue either.

---

<div class="post-metadata">

### Author: ![GuillaumeGautreau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaumegautreau/32/557_2.png) [@GuillaumeGautreau](https://community.forestadmin.com/u/GuillaumeGautreau)
#### Post date: [February 23, 2023, 8:34am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/7 "2023-02-23T08:34:43Z")

</div>

Can you check that you have a mechanism to catch error in your `app.js` file?

In my example project I have, at the end of the file

```javascript
app.use(function (err, req, res, next) {
  console.error(err, err.stack)
  res.status(500).json(err)
})

```

---

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [February 23, 2023, 10:27am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/8 "2023-02-23T10:27:57Z")

</div>

i already recheck `forest-express-sequelize` version in package.json and package-lock.json and i use version `7.11.3`

---

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [February 23, 2023, 10:28am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/9 "2023-02-23T10:28:09Z")

</div>

I use this to catch error in app.js, is this correct ?

```javascript
app.use(errorHandler({ logger }));

```

`errorHandler` and `logger` from `forest-express@5.3.1`

and also I try your code example and it didn’t works

---

<div class="post-metadata">

### Author: ![umar006](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umar006/32/5794_2.png) [@umar006](https://community.forestadmin.com/u/umar006)
#### Post date: [March 2, 2023, 3:00am UTC](https://community.forestadmin.com/t/application-stopped-when-delete-list-of-records/6013/10 "2023-03-02T03:00:54Z")

</div>

I think it’s a bug from `forest-express-sequelize@7.11.3` because I upgrade the library to version 8 and the error has gone

thank you for the help
