Commit c9af28e
[App Service] Fix #29290: Improve error message for az webapp deploy --src-url Bad Request
When `az webapp deploy --src-url` receives an HTTP 400 response with an
empty body, the CLI previously displayed just "Bad Request" with no
actionable guidance. This was because `send_raw_request` raises
`HTTPError` before the deploy-specific error handling code is reached.
This change wraps the ARM deploy request in a helper that catches 400
responses and provides a clear error message with possible causes:
- Source URL not accessible or SAS token expired
- URL doesn't point to a valid deployment artifact
- Artifact type mismatch
If the response body contains details from ARM, those are included too.
Fixes #29290
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent dc9fdb3 commit c9af28e
File tree
2 files changed
+99
-5
lines changed- src/azure-cli/azure/cli/command_modules/appservice
- tests/latest
2 files changed
+99
-5
lines changedLines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9781 | 9781 | | |
9782 | 9782 | | |
9783 | 9783 | | |
| 9784 | + | |
| 9785 | + | |
| 9786 | + | |
| 9787 | + | |
| 9788 | + | |
| 9789 | + | |
| 9790 | + | |
| 9791 | + | |
| 9792 | + | |
| 9793 | + | |
| 9794 | + | |
| 9795 | + | |
| 9796 | + | |
| 9797 | + | |
| 9798 | + | |
| 9799 | + | |
| 9800 | + | |
| 9801 | + | |
| 9802 | + | |
| 9803 | + | |
| 9804 | + | |
| 9805 | + | |
9784 | 9806 | | |
9785 | 9807 | | |
9786 | 9808 | | |
| |||
9828 | 9850 | | |
9829 | 9851 | | |
9830 | 9852 | | |
9831 | | - | |
| 9853 | + | |
9832 | 9854 | | |
9833 | 9855 | | |
9834 | | - | |
| 9856 | + | |
9835 | 9857 | | |
9836 | 9858 | | |
9837 | 9859 | | |
9838 | | - | |
| 9860 | + | |
9839 | 9861 | | |
9840 | | - | |
| 9862 | + | |
9841 | 9863 | | |
9842 | 9864 | | |
9843 | 9865 | | |
| |||
Lines changed: 73 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
642 | 714 | | |
643 | 715 | | |
644 | 716 | | |
| |||
0 commit comments