|
@@ -1,11 +1,13 @@
|
|
|
import axiosInstance from '../interceptor';
|
|
|
|
|
|
export const changeBodyPosition = async (instanceUid: string) => {
|
|
|
- const response = await axiosInstance.post(`auth/task/inspection/start`, {
|
|
|
+ const response = await axiosInstance.post(`/auth/task/inspection/start`, {
|
|
|
instance_uid: instanceUid,
|
|
|
});
|
|
|
-
|
|
|
- if (response.data.code !== '0' && response.data.code !== '0x020101') {
|
|
|
+ console.log(
|
|
|
+ `Error code: ${response.data.code}, Description: ${response.data.description}`
|
|
|
+ );
|
|
|
+ if (response.data.code !== '0x000000' && response.data.code !== '0x020101') {
|
|
|
throw new Error(
|
|
|
`Error code: ${response.data.code}, Description: ${response.data.description}`
|
|
|
);
|