Skip to content

Stacktrce is logged on invalid imput to migration module #7983

@kofemann

Description

@kofemann

If invalid input is provided, then the migration endpoint logs a stacktrace instead of appropriate error log message:

18 Dec 2025 11:32:50 (Frontend-S) [] Failed to parse JSON "{
  "sourcePool": "pool-a",
  "targetPools": ["pool-b"],
  "exclude": ["pool_res1]
}": Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 4, column: 26]
18 Dec 2025 11:32:50 (Frontend-S) [] Uncaught exception in thread jetty-164
org.json.JSONException: Unterminated string at 83 [character 0 line 5]
	at org.json.JSONTokener.syntaxError(JSONTokener.java:503)
	at org.json.JSONTokener.nextString(JSONTokener.java:302)
	at org.json.JSONTokener.nextSimpleValue(JSONTokener.java:430)
	at org.json.JSONTokener.nextValue(JSONTokener.java:421)
	at org.json.JSONArray.<init>(JSONArray.java:105)
	at org.json.JSONTokener.nextValue(JSONTokener.java:416)
	at org.json.JSONObject.<init>(JSONObject.java:237)
	at org.json.JSONObject.<init>(JSONObject.java:402)
	at org.dcache.restful.resources.migration.MigrationResources.submitMigrationCopy(MigrationResources.java:123)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA request that enhances existing behaviourfrontendTargeting the Frontend service

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions