Yes, you need to look at the error domain. Error codes are meaningful only within an error domain.
For example, if the error domain is G_IO_ERROR, then error code 24 would correspond to G_IO_ERROR_TIMED_OUT. That’s surely what you’ve got! You’re dealing with a GIOError, and not a GDBusError.