|
@@ -4,5 +4,12 @@ export const changeBodyPosition = async (instanceUid: string) => {
|
|
|
const response = await axiosInstance.post(`auth/task/inspection/start`, {
|
|
|
instance_uid: instanceUid,
|
|
|
});
|
|
|
+
|
|
|
+ if (response.data.code !== '0' && response.data.code !== '0x020101') {
|
|
|
+ throw new Error(
|
|
|
+ `Error code: ${response.data.code}, Description: ${response.data.description}`
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
return response.data;
|
|
|
};
|