Skip to content

IaC: add custom error messages based on service availability status#13597

Merged
k-a-il merged 5 commits intomainfrom
flc-80-custom-error-messages
Jan 14, 2026
Merged

IaC: add custom error messages based on service availability status#13597
k-a-il merged 5 commits intomainfrom
flc-80-custom-error-messages

Conversation

@k-a-il
Copy link
Contributor

@k-a-il k-a-il commented Jan 8, 2026

Motivation

Integrates the license catalog with LocalStack exceptions to return customized errors based on the AWS service catalog status.
If a NotImplemented exception includes a message from service level, the defined message is returned without accessing the catalog, otherwise, the exception message is obtained from the catalog.

Changes

  • Integrates the catalog into the NotImplementedError handling logic by adding it to the ServiceExceptionSerializer and the service Skeleton class
  • pydantic library dependency was moved to the base runtime dependencies because it is required for AWS Catalog validation
  • Removed the logic that created and tested the previouisly used error message

Tests

  • Updated ServiceExceptionSerializer and the service Skeleton class tests

Notes

  • Merge after pydantic version is updated by automatic dependency updates

Related

FLC-80

@k-a-il k-a-il self-assigned this Jan 8, 2026
@k-a-il k-a-il added semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases docs: skip Pull request does not require documentation changes notes: needed Pull request should be mentioned in the release notes labels Jan 8, 2026
@k-a-il k-a-il changed the title IaC:add custom error messages based on service availability status IaC: add custom error messages based on service availability status Jan 8, 2026
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Test Results - Preflight, Unit

23 045 tests   - 1   21 200 ✅  - 1   6m 11s ⏱️ ±0s
     1 suites ±0    1 845 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 332ad14. ± Comparison against base commit 40c916d.

This pull request removes 6 and adds 5 tests. Note that renamed tests count towards both.
tests.unit.aws.handlers.test_service.TestServiceExceptionSerializer ‑ test_not_implemented_error[-not available in your current license plan or has not yet been emulated]
tests.unit.aws.handlers.test_service.TestServiceExceptionSerializer ‑ test_not_implemented_error[Ups!-Ups!]
tests.unit.aws.test_skeleton ‑ test_skeleton_e2e_sqs_send_message_not_implemented[api_class0-The API action 'SendMessage' for service 'sqs' is either not available in your current license plan or has not yet been emulated by LocalStack. Please refer to https://docs.localstack.cloud/references/coverage/coverage_sqs for more information.]
tests.unit.aws.test_skeleton ‑ test_skeleton_e2e_sqs_send_message_not_implemented[api_class1-We will implement it soon, that's a promise!]
tests.unit.utils.test_coverage_docs ‑ test_coverage_link_for_existing_service
tests.unit.utils.test_coverage_docs ‑ test_coverage_link_for_non_existing_service
tests.unit.aws.handlers.test_service.TestServiceExceptionSerializer ‑ test_not_implemented_error_uses_catalog_when_message_is_empty[AVAILABLE_WITH_LICENSE_UPGRADE-is not supported with your LocalStack license]
tests.unit.aws.handlers.test_service.TestServiceExceptionSerializer ‑ test_not_implemented_error_uses_catalog_when_message_is_empty[None-The API for service opensearch is either not included in your current license plan or has not yet been emulated by LocalStack.]
tests.unit.aws.handlers.test_service.TestServiceExceptionSerializer ‑ test_not_implemented_error_with_custom_message
tests.unit.aws.test_skeleton ‑ test_skeleton_e2e_sqs_send_message_not_implemented[api_class0-NOT_IMPLEMENTED-Sorry, the SendMessage operation on the sqs service is not currently supported by LocalStack.]
tests.unit.aws.test_skeleton ‑ test_skeleton_e2e_sqs_send_message_not_implemented[api_class1-NOT_IMPLEMENTED-We will implement it soon, that's a promise!]

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 3s ⏱️ +4s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 332ad14. ± Comparison against base commit 40c916d.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Test Results (amd64) - Integration, Bootstrap

    5 files      5 suites   2h 32m 32s ⏱️
5 569 tests 5 008 ✅ 561 💤 0 ❌
5 575 runs  5 008 ✅ 567 💤 0 ❌

Results for commit 332ad14.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 55m 53s ⏱️ + 1m 28s
5 162 tests ±0  4 764 ✅ ±0  398 💤 ±0  0 ❌ ±0 
5 164 runs  ±0  4 764 ✅ ±0  400 💤 ±0  0 ❌ ±0 

Results for commit 332ad14. ± Comparison against base commit 40c916d.

♻️ This comment has been updated with latest results.

@k-a-il k-a-il force-pushed the flc-80-custom-error-messages branch from 7e6aaf1 to 6d190eb Compare January 9, 2026 12:30
@github-actions
Copy link

github-actions bot commented Jan 12, 2026

S3 Image Test Results (AMD64 / ARM64)

    2 files  ±0      2 suites  ±0   8m 21s ⏱️ -23s
  552 tests ±0    500 ✅ ±0   52 💤 ±0  0 ❌ ±0 
1 104 runs  ±0  1 000 ✅ ±0  104 💤 ±0  0 ❌ ±0 

Results for commit 332ad14. ± Comparison against base commit 40c916d.

♻️ This comment has been updated with latest results.

@k-a-il k-a-il requested review from bentsku and silv-io January 12, 2026 15:05
@k-a-il k-a-il marked this pull request as ready for review January 12, 2026 16:43
@k-a-il k-a-il added this to the 4.13 milestone Jan 12, 2026
Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@k-a-il k-a-il merged commit 7517af4 into main Jan 14, 2026
52 checks passed
@k-a-il k-a-il deleted the flc-80-custom-error-messages branch January 14, 2026 09:28
k-a-il added a commit that referenced this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes notes: needed Pull request should be mentioned in the release notes semver: minor Non-breaking changes which can be included in minor releases, but not in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants