Power off, disconnect the AC adapter, remove the base cover, disconnect the battery from the system board and hold the power button for 30 sec.  Remove and reinstall the drive(s) (there may be one or two, one 2.5" and one M.2 card).   Power up and check again.  If you still see the same error, the drive is toast - replace it and reload the OS, and restore your data from your backups.  
As soon as I switching on the laptop, I am getting the error "hard drive not installed". On pressing continue, it is shutting down. I tried running diagnostics, and it is giving me the same error for hard drive. Please advice.
XPS 15 9550 Hard drive not installed error