Nil Error When Connecting to MQTT Broker (AWS IoT Core)

I’m trying to use AWS IoT Core as my MQTT Broker between LoRa Server and my LoRa Gateway. When I try to connect LoRa Server to IoT Core, I get the below error:

ERRO[0494] backend/gateway: connecting to mqtt broker failed, will retry in 2s: Network Error : %!s(<nil>)

The configuration I’m trying to use is as follows:

# AWS IoT Core MQTT connection

# AWS-provided CA file

# TLS certificate file (optional)

# TLS key file (optional)

Version of LoRa Server:

This error message appears here in the source code, but I can’t see any way token.Error() would ever print nil in this code.

Is this a configuration error / incompatibility or a bug?