View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006701 | libeufin | other | public | 2021-01-15 11:07 | 2023-01-08 10:32 |
Reporter | MS | Assigned To | MS | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 0.9.0 | Fixed in Version | 0.9.0 | ||
Summary | 0006701: Invalid POSTed JSONs lead to 500 Internal server error. | ||||
Description | Instead, those errors should respond with some 4xx status code. | ||||
Steps To Reproduce | POST a payment to /admin/payments at the Sandbox that lacks at least one required field. | ||||
Tags | No tags attached. | ||||
|
Now it fails only when the JSON is malformed, throwing this: 14:52:00.892 [eventLoopGroupProxy-4-1] ERROR tech.libeufin.nexus - Uncaught exception while handling '/users' com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'foo': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (InputStreamReader); line: 1, column: 4] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1840) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:722) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2868) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._reportInvalidToken(ReaderBasedJsonParser.java:2846) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchToken2(ReaderBasedJsonParser.java:2643) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchToken(ReaderBasedJsonParser.java:2621) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._matchFalse(ReaderBasedJsonParser.java:2595) at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:745) at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4340) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4189) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3218) at io.ktor.jackson.JacksonConverter$convertForReceive$2.invokeSuspend(JacksonConverter.kt:59) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) 14:52:00.899 [eventLoopGroupProxy-4-1] DEBUG tech.libeufin.nexus - 500 Internal Server Error: POST - /users POST anything that's not a valid JSON, in order to reproduce. |
|
fixed and tested here: 3883732379d0dc00658f186145d6c4cf834a5d21. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-01-15 11:07 | MS | New Issue | |
2021-01-27 14:56 | MS | Note Added: 0017417 | |
2021-01-27 16:11 | MS | Note Added: 0017419 | |
2021-01-27 16:11 | MS | Assigned To | => MS |
2021-01-27 16:11 | MS | Status | new => resolved |
2021-01-27 16:11 | MS | Resolution | open => fixed |
2021-01-27 16:11 | MS | Note Edited: 0017419 | |
2023-01-08 10:31 | Christian Grothoff | Fixed in Version | => 0.9.0 |
2023-01-08 10:31 | Christian Grothoff | Target Version | => 0.9.0 |
2023-01-08 10:32 | Christian Grothoff | Status | resolved => closed |