Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-AzureRmServiceBusTopic : Error information misleading/inaccurate #5058

Closed
rajaprad opened this issue Nov 30, 2017 · 4 comments
Closed

New-AzureRmServiceBusTopic : Error information misleading/inaccurate #5058

rajaprad opened this issue Nov 30, 2017 · 4 comments
Assignees
Labels
Service Attention This issue is responsible by Azure service team. Service Bus

Comments

@rajaprad
Copy link

rajaprad commented Nov 30, 2017

Cmdlet(s)

PowerShell Version

New-AzureRmServiceBusTopic

Module Version

5.0.0

OS Version

10.0.14409.1012

Description

I wanted to disable AutoDeleteOnIdle on the queue when provisioning, Seems there is no option for it. I tried a value -1,which was previously available in ACS SB Topics when creating through a NamespaceManager.

The error message does not have any relevant information on the cause of failure. However only on debug actual error is exposed.

New-AzureRmServiceBusTopic -ResourceGroupName something -Namespace something -Name something -EnablePartitioning $true -AutoDeleteOnIdle -1 -DefaultMessageTimeToLive 2 -DuplicateDetectionHistoryTimeWindow 5 -EnableBatchedOperations $true -MaxSizeInMegabytes 5120 -RequiresDuplicateDetection $true
New-AzureRmServiceBusTopic : Operation returned an invalid status code 'BadRequest'
At line:1 char:1

  • New-AzureRmServiceBusTopic -ResourceGroupName meusresourcegrprm -Name ...
  •   + CategoryInfo          : CloseError: (:) [New-AzureRmServiceBusTopic], ErrorResponseException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.ServiceBus.Commands.Topic.NewAzureRmServiceBusTopic
    
    

Debug Output

============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/9536-0b01899fdce2/resourceGroups/something/providers/Microsoft.ServiceBus/namespaces/something/topics/something
eue?api-version=2017-04-01

Headers:
x-ms-client-request-id : 52b921-b5c9e9cf4916
accept-language : en-US

Body:
{
"properties": {
"defaultMessageTimeToLive": "P2D",
"maxSizeInMegabytes": 5120,
"requiresDuplicateDetection": true,
"duplicateDetectionHistoryTimeWindow": "P5D",
"enableBatchedOperations": true,
"autoDeleteOnIdle": "-P1D",
"enablePartitioning": true
}
}

============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma : no-cache
x-ms-request-id : bc35c4f8-ecf07_M4_M4
Server-SB : Service-Bus-Resource-Provider/SN1
Cache-Control : no-cache
Server : Service-Bus-Resource-Provider/SN1,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id : 5b823a257dcae8
x-ms-routing-request-id : EASTUS:20171130T2003881-4b3a257dcae8
Strict-Transport-Security : max-age=31536000; includeSubDomains
Date : Thu, 30 Nov 2017 20:03:00 GMT

Body:
{
"error": {
"message": "SubCode=40000. The value supplied must be between 00:05:00 and 10675199.02:48:05.4775807.\r\nParameter name: AutoDeleteOnIdle\r\nActual value was -1.00:00:00.
TrackingId:bc35c4f8-ecf0-40a8-94cf-0fe0112aa117_M4_M4_G22, SystemTracker:meusintegrationrm5.servicebus.windows.net:remotestartqueue, Timestamp:11/30/2017 8:02:59 PM CorrelationId:
5b82c5531-4b3a257dcae8",
"code": "BadRequest"
}
}

Script/Steps for Reproduction

New-AzureRmServiceBusTopic -ResourceGroupName something -Namespace something -Name something -EnablePartitioning $true -AutoDeleteOnIdle -1 -DefaultMessageTimeToLive 2 -DuplicateDetectionHistoryTimeWindow 5 -EnableBatchedOperations $true -MaxSizeInMegabytes 5120 -RequiresDuplicateDetection $true

@v-Ajnava
Copy link
Member

v-Ajnava commented Dec 1, 2017

You can set -AutoDeleteOnIdle to timespan.maxvalue (10675199.02:48:05.4775807) achieving similar to disable AutoDeleteIdle

@rajaprad
Copy link
Author

rajaprad commented Dec 1, 2017

This issue specifically targets on the error message written back. The actual error message appears only in debug mode.

@cormacpayne
Copy link
Member

@v-Ajnava Hey Ajit, would you mind taking a look at the comment above?

@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@v-Ajnava
Copy link
Member

issues is resolved and fix is in release from Aug 2018 onward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention This issue is responsible by Azure service team. Service Bus
Projects
None yet
Development

No branches or pull requests

4 participants