@@ -268,14 +268,19 @@ await act.Should()
268268 . Where ( ex => ex . StatusCode == System . Net . HttpStatusCode . NotFound ) ;
269269 }
270270
271- /// <summary>I12: Verifies that create subscription with invalid rate plan returns 404 .</summary>
271+ /// <summary>I12: Verifies that create subscription with invalid rate plan returns 400 Bad Request .</summary>
272272 /// <remarks>
273- /// Per Cloudflare API: POST with non-existent rate plan returns 404 Not Found.
274- /// Error code 1298: "Review the rate plan ID and try again. Could not find the rate plan."
275- /// https://developers.cloudflare.com/api/resources/zones/subresources/subscriptions/methods/create/
273+ /// <para>
274+ /// Per Cloudflare API: POST with non-existent rate plan returns 400 Bad Request with error code 7501.
275+ /// Error message: "unknown or deprecated rate plan: 'invalid-rate-plan-that-does-not-exist'"
276+ /// </para>
277+ /// <para>
278+ /// <b>Note:</b> The documentation previously indicated 404, but current behavior returns 400.
279+ /// If this test fails with 404, Cloudflare may have reverted to the documented behavior.
280+ /// </para>
276281 /// </remarks>
277282 [ IntegrationTest ]
278- public async Task CreateZoneSubscriptionAsync_InvalidRatePlan_ThrowsNotFound ( )
283+ public async Task CreateZoneSubscriptionAsync_InvalidRatePlan_ThrowsBadRequest ( )
279284 {
280285 // Arrange
281286 var zoneId = _settings . ZoneId ;
@@ -285,10 +290,10 @@ public async Task CreateZoneSubscriptionAsync_InvalidRatePlan_ThrowsNotFound()
285290 // Act
286291 var act = ( ) => _sut . CreateZoneSubscriptionAsync ( zoneId , request ) ;
287292
288- // Assert - Non-existent rate plan returns 404 Not Found
293+ // Assert - Invalid rate plan references return 400 Bad Request with error code 7501.
289294 await act . Should ( )
290295 . ThrowAsync < HttpRequestException > ( )
291- . Where ( ex => ex . StatusCode == System . Net . HttpStatusCode . NotFound ) ;
296+ . Where ( ex => ex . StatusCode == System . Net . HttpStatusCode . BadRequest ) ;
292297 }
293298
294299 /// <summary>I13: Verifies that update subscription on non-existent zone returns 404.</summary>
0 commit comments