--- /dev/null
+package io.bytom.exception;\r
+\r
+import com.google.gson.annotations.SerializedName;\r
+\r
+import java.util.List;\r
+\r
+/**\r
+ * BuildException wraps errors returned by the build-transaction endpoint.\r
+ */\r
+public class BuildException extends APIException {\r
+\r
+ public BuildException(String message, String requestId) {\r
+ super(message, requestId);\r
+ }\r
+\r
+ public static class ActionError extends APIException {\r
+\r
+ public static class Data {\r
+ /**\r
+ * The index of the action that caused this error.\r
+ */\r
+ @SerializedName("index")\r
+ public Integer index;\r
+ }\r
+\r
+ public ActionError(String message, String requestId) {\r
+ super(message, requestId);\r
+ }\r
+\r
+ /**\r
+ * Additional data pertaining to the error.\r
+ */\r
+ public Data data;\r
+ }\r
+\r
+ public static class Data {\r
+ /**\r
+ * A list of errors resulting from building actions.\r
+ */\r
+ @SerializedName("actions")\r
+ public List<ActionError> actionErrors;\r
+ }\r
+\r
+ /**\r
+ * Extra data associated with this error, if any.\r
+ */\r
+ @SerializedName("data")\r
+ public Data data;\r
+}\r