You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server: Introduce ErrorResponse and use it everywhere
When an error is created when processing a client request, return
an ErrorResponse JSON object that includes the detailed error message
and an optional details map that can be used to provide contextual
details regarding the error case.
This standardizes the error response to common data structure.
Use the optional details map to return the conflicting trace or
experiment object for 409 (conflict) error case.
This commit also updates the swagger documentation accordingly.
This commit fixes the swagger documentation for trace and experiment
regarding error code 409 (conflict) and some missing definitions.
Contributes to fix issue:
eclipse-cdt-cloud/trace-server-protocol#122
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Copy file name to clipboardExpand all lines: trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests/src/org/eclipse/tracecompass/incubator/trace/server/jersey/rest/core/tests/services/DataProviderConfigurationServiceTest.java
Copy file name to clipboardExpand all lines: trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests/src/org/eclipse/tracecompass/incubator/trace/server/jersey/rest/core/tests/services/ExperimentManagerServiceTest.java
privatestaticfinalStringEXPERIMENT_NAME_EXISTS = "The experiment with same name already exists with conflicting parameters. Use a different name to avoid the conflict. See error details for conflicting experiment."; //$NON-NLS-1$
69
+
67
70
/**
68
71
* Basic test for the {@link ExperimentManagerService}
69
72
*/
@@ -145,6 +148,22 @@ public void testRePost() {
145
148
146
149
}
147
150
151
+
// Create a new experiment with the same name but different traces which should return in a conflict
Copy file name to clipboardExpand all lines: trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests/src/org/eclipse/tracecompass/incubator/trace/server/jersey/rest/core/tests/services/TimeGraphDataProviderServiceTest.java
Copy file name to clipboardExpand all lines: trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core.tests/src/org/eclipse/tracecompass/incubator/trace/server/jersey/rest/core/tests/services/TraceManagerServiceTest.java
privatestaticfinalStringNAME_EXISTS = "The trace with same name already exists with conflicting parameters. Use a different name to avoid the conflict. See error details for conflicting trace."; //$NON-NLS-1$
67
+
privatestaticfinalStringDELTETE_TRACE_IN_USE = "The trace is in use by at least one experiment thus cannot be deleted. See error details for conflicting trace."; //$NON-NLS-1$
68
+
53
69
/**
54
70
* Test basic operations on the {@link TraceManagerService}.
55
71
*/
@@ -110,6 +126,27 @@ public void testConflictingTraces() {
110
126
// matter if the path is different, the trace will be added
0 commit comments