AT+CPMS=?
+CPMS: (),(),()
AT+CPMS="SM"
ERROR
This is a case where using extended error reporting, AT+CMEE=2, very likely will give some hint on what the problem is rather than just "something went wrong", aka ERROR.
I strongly suspect the problem to be not giving both <mem1> and <mem2> values.