From time to time I see
405 errors
11:16:10,103 DEBUG [ASConnection] We got a 405 for url
http://127.0.0.1:49990/management
and operation Operation{operation='read-attribute', address=Address{path: },
additionalProperties={name=launch-type, include-defaults=true}}, method=POST
conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("POST");
conn.addRequestProperty("Content-Type",
"application/json");
conn.addRequestProperty("Accept", "application/json");
My understanding is that those only should show when content type is wrong. Looking at the
sources I see that they
may happen
- on OPTIONS method (which we don't do)
- for other contexts that only support GET ( like / )
Any idea what may go wrong here?
And then for requests for stuff that is e.g. not deployed , the API returns "internal
server error" 500,
11:16:15,370 ERROR [ASConnection] Operation{operation='read-resource',
address=Address{path: subsystem=connector}, additionalProperties={include-defaults=true}}
failed with 500 (Internal Server Error) - response body was [{"outcome" :
"failed", "failure-description" : "JBAS014739: No handler for
read-resource at address [(\"subsystem\" => \"connector\")]",
"rolled-back" : true}].
I think a 404 not found would be much more correct. Especially as it looks like
URLConnections throw exceptions on 500 errors.
Heiko
--
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Mark Hegarty, Charlie Peters, Michael Cunningham, Charles Cachera