diff --git a/lib/ConnectionContextBase.ts b/lib/ConnectionContextBase.ts index b35a349..4ce9371 100644 --- a/lib/ConnectionContextBase.ts +++ b/lib/ConnectionContextBase.ts @@ -140,7 +140,7 @@ export module ConnectionContextBase { const userAgent = parameters.connectionProperties.userAgent; if (userAgent.length > Constants.maxUserAgentLength) { throw new Error( - `The user-agent string cannot be more than 128 characters in length.` + + `The user-agent string cannot be more than ${Constants.maxUserAgentLength} characters in length.` + `The given user-agent string is: ${userAgent} with length: ${userAgent.length}` ); } diff --git a/lib/util/constants.ts b/lib/util/constants.ts index 4f37247..95bea79 100644 --- a/lib/util/constants.ts +++ b/lib/util/constants.ts @@ -33,7 +33,7 @@ export const cbsEndpoint = "$cbs"; export const cbsReplyTo = "cbs"; export const operationPutToken = "put-token"; export const aadEventHubsAudience = "https://eventhubs.azure.net/"; -export const maxUserAgentLength = 128; +export const maxUserAgentLength = 512; export const vendorString = "com.microsoft"; export const attachEpoch = `${vendorString}:epoch`; export const receiverIdentifierName = `${vendorString}:receiver-name`; diff --git a/package-lock.json b/package-lock.json index 11f57ba..eca9550 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@azure/amqp-common", - "version": "1.0.0-preview.2", + "version": "1.0.0-preview.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 310e1d5..77294b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@azure/amqp-common", - "version": "1.0.0-preview.2", + "version": "1.0.0-preview.3", "description": "Common library for amqp based azure sdks like @azure/event-hubs.", "author": "Microsoft Corporation", "license": "MIT",