Is that an Arduino layer over Mbed ? Mbed has trouble with a I2C Scanner that uses write mode with zero data length.
Maybe a I2C read will work with zero data length, but the Wire library probably does not accept that.
Some manufacturer's don't implement the I2C read mode or the I2C write mode, because that is not used in that chip.
I suggest to read all 4 bytes.
Replace this:
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
with this:
int n = Wire.requestFrom(address,4);
if (n == 4) {
I think that you also have a voltage conflict on the I2C bus. Is the sensor a 5V chip (with a 5V I2C bus) and the STM32 is a 3.3V chip (with a 3.3V I2C bus).