An automatic analysis device comprising: a conveyance line through which a specimen rack can be conveyed on which a plurality of specimen containers in which a specimen to be analyzed is accommodated are mounted; a dispensing mechanism (108, 208) configured to dispense the specimen from the specimen container; a dispensing line (109, 209) on which the specimen rack can be conveyed in and out from one end and conveyed to a dispensing position at which the specimen is dispensed from the specimen container by the dispensing mechanism (108, 208); a rack standby unit having a slot in which the specimen rack is mountable, and configured to transfer the specimen rack between the one end of the conveyance line and one end of the dispensing line (109, 209); an identification device (110, 210) configured to read information on a specimen in the specimen container mounted on the specimen rack to be conveyed to the conveyance line; a rack accommodating unit in which the specimen rack can be accommodated at a position at which the specimen rack is removable; and a control unit, wherein the control unit is configured to when there is an error in a specimen accommodated in the specimen container mounted on the specimen rack, control the conveyance of the specimen rack based on information on the specimen in which the error occurs and information on a specimen accommodated in another specimen container in the specimen rack on which the specimen container accommodating the specimen is mounted, and a retrieval condition for retrieving a specimen rack in the rack accommodating unit, characterized in that, when there is the error, the control unit is configured to obtain a remaining time which is a time required for processing on a specimen accommodated in another specimen container in the specimen rack on which the sample container accommodating the specimen in which the error occurs is mounted, determine whether the obtained remaining time is within a preset allowable time range, and control the conveyance of the specimen rack based on a determination result and the retrieval condition. a conveyance line through which a specimen rack can be conveyed on which a plurality of specimen containers in which a specimen to be analyzed is accommodated are mounted; a dispensing mechanism (108, 208) configured to dispense the specimen from the specimen container; a dispensing line (109, 209) on which the specimen rack can be conveyed in and out from one end and conveyed to a dispensing position at which the specimen is dispensed from the specimen container by the dispensing mechanism (108, 208); a rack standby unit having a slot in which the specimen rack is mountable, and configured to transfer the specimen rack between the one end of the conveyance line and one end of the dispensing line (109, 209); an identification device (110, 210) configured to read information on a specimen in the specimen container mounted on the specimen rack to be conveyed to the conveyance line; a rack accommodating unit in which the specimen rack can be accommodated at a position at which the specimen rack is removable; and a control unit, wherein the control unit is configured to when there is an error in a specimen accommodated in the specimen container mounted on the specimen rack, control the conveyance of the specimen rack based on information on the specimen in which the error occurs and information on a specimen accommodated in another specimen container in the specimen rack on which the specimen container accommodating the specimen is mounted, and a retrieval condition for retrieving a specimen rack in the rack accommodating unit, characterized in that, when there is the error, the control unit is configured to obtain a remaining time which is a time required for processing on a specimen accommodated in another specimen container in the specimen rack on which the sample container accommodating the specimen in which the error occurs is mounted, determine whether the obtained remaining time is within a preset allowable time range, and control the conveyance of the specimen rack based on a determination result and the retrieval condition.