Content
Updated by Jan Sandbrink 3 days ago
### Steps to reproduce
1. Call a writing API endpoint (i.e. create or update) that accepts `_links`
2. Instead of passing a valid link object (`{ "href": "something" }`), pass a string
Full example:
```text
PATCH https://openproject.local/api/v3/storages/2
{
"_links": {
"banana": "is healthy"
}
}
```
### What is the buggy behavior?
An error occurs and the server responds in an HTTP 500.
```text
undefined method 'merge' for an instance of String
```
### What is the expected behavior?
Since the error is on the client side, an HTTP 4xx should be raised and it should indicate what's wrong about the request.
### Logs
* AppSignal: https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/978
1. Call a writing API endpoint (i.e. create or update) that accepts `_links`
2. Instead of passing a valid link object (`{ "href": "something" }`), pass a string
Full example:
```text
PATCH https://openproject.local/api/v3/storages/2
{
"_links": {
"banana": "is healthy"
}
}
```
### What is the buggy behavior?
An error occurs and the server responds in an HTTP 500.
```text
undefined method 'merge' for an instance of String
```
### What is the expected behavior?
Since the error is on the client side, an HTTP 4xx should be raised and it should indicate what's wrong about the request.
### Logs
* AppSignal: https://appsignal.com/openproject-gmbh/sites/678fa146338a5d816f8d696c/exceptions/incidents/978