# Bug OP-11055 - notifications API returns error as an array not string

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-11055

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 12.4.0 |
| Observed in versions |  |
| Sprint | 12.4.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  send a mark all notifications as read request with `resourceId` as filter but a not existing workpackage  
    e.g. `curl 'http://host.docker.internal:3000/api/v3/notifications/unread_ian?filters=%5B%7B%22resourceId%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22180%22%5D%7D%7D%5D'`  

### What is the buggy behavior?

The error message is wrapped in an array

This is consistent with the documentation of POST /api/v3/notifications/read\_ian and GET/api/v3/notifications  
but these are the only two endpoints where that is the case

### What is the expected behavior?

error message should be a string

### Environment information

**OpenProject installation type**

*   [ ] Hosted cloud edition
*   [ ] Packaged installation
    *   What distribution?
*   [ ] Docker All-in-one container
*   [x] Docker-compose installation
*   [ ] Other (please specify)

**OpenProject version**

12.2
