Skip to content
Snippets Groups Projects

Add server side scripting to gRPC API

Open Joscha Schmiedt requested to merge f-sss4grpc into dev
1 file
+ 37
3
Compare changes
  • Side-by-side
  • Inline
@@ -240,9 +240,43 @@ public class ServerSideScriptingServiceImpl extends ServerSideScriptingServiceIm
new StatusException(Status.NOT_FOUND.withDescription(description).withCause(e)));
return;
}
// TODO: SERVER_SIDE_DOES_NOT_EXIST, SERVER_SIDE_SCRIPT_NOT_EXECUTABLE,
// SERVER_SIDE_SCRIPT_ERROR, SERVER_SIDE_SCRIPT_SETUP_ERROR,
// SERVER_SIDE_SCRIPT_TIMEOUT, SERVER_SIDE_SCRIPT_MISSING_CALL
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_DOES_NOT_EXIST)
{
responseObserver.onError(
new StatusException(Status.NOT_FOUND.withDescription(description).withCause(e)));
return;
}
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_NOT_EXECUTABLE)
{
responseObserver.onError(
new StatusException(Status.PERMISSION_DENIED.withDescription(description).withCause(e)));
return;
}
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_ERROR)
{
responseObserver.onError(
new StatusException(Status.UNKNOWN.withDescription(description).withCause(e)));
return;
}
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_SETUP_ERROR)
{
responseObserver.onError(
new StatusException(Status.UNKNOWN.withDescription(description).withCause(e)));
return;
}
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_TIMEOUT)
{
responseObserver.onError(
new StatusException(Status.DEADLINE_EXCEEDED.withDescription(description).withCause(e)));
return;
}
else if (e == ServerMessages.SERVER_SIDE_SCRIPT_MISSING_CALL)
{
responseObserver.onError(
new StatusException(Status.INVALID_ARGUMENT.withDescription(description).withCause(e)));
return;
}
e.printStackTrace();
responseObserver.onError(
new StatusException(Status.UNKNOWN.withDescription(description).withCause(e)));
Loading