Skip to content

Commit 0d05d8c

Browse files
authored
Raise the severity for query error validator to danger (#2758)
1 parent c827947 commit 0d05d8c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/protocols/QueryErrorCodeValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import software.amazon.smithy.utils.SmithyInternalApi;
2424

2525
/**
26-
* Emits a warning if two or more error shapes share the same error code.
26+
* Emits a danger if two or more error shapes share the same error code.
2727
*/
2828
@SmithyInternalApi
2929
public class QueryErrorCodeValidator extends AbstractValidator {
@@ -73,7 +73,7 @@ private List<ValidationEvent> validateService(Model model, ServiceShape service)
7373
if (events.isEmpty()) {
7474
events = new ArrayList<>();
7575
}
76-
events.add(warning(service,
76+
events.add(danger(service,
7777
String.format("Multiple error shapes with the error code `%s` found: [%s]. This error code "
7878
+ "ambiguity will result in the wrong error shape being deserialized when running the "
7979
+ "query protocol. This pain will be carried forward when migrating to a new protocol "
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[WARNING] smithy.example#QueryCompatibleService: Multiple error shapes with the error code `ResourceNotFound` found: [smithy.example#DocumentNotFound, smithy.example#ResourceNotFound]. This error code ambiguity will result in the wrong error shape being deserialized when running the query protocol. This pain will be carried forward when migrating to a new protocol when using the awsQueryCompatible trait. | QueryErrorCode
2-
[WARNING] smithy.example#QueryService: Multiple error shapes with the error code `ResourceNotFound` found: [smithy.example#DocumentNotFound, smithy.example#ResourceNotFound]. This error code ambiguity will result in the wrong error shape being deserialized when running the query protocol. This pain will be carried forward when migrating to a new protocol when using the awsQueryCompatible trait. | QueryErrorCode
1+
[DANGER] smithy.example#QueryCompatibleService: Multiple error shapes with the error code `ResourceNotFound` found: [smithy.example#DocumentNotFound, smithy.example#ResourceNotFound]. This error code ambiguity will result in the wrong error shape being deserialized when running the query protocol. This pain will be carried forward when migrating to a new protocol when using the awsQueryCompatible trait. | QueryErrorCode
2+
[DANGER] smithy.example#QueryService: Multiple error shapes with the error code `ResourceNotFound` found: [smithy.example#DocumentNotFound, smithy.example#ResourceNotFound]. This error code ambiguity will result in the wrong error shape being deserialized when running the query protocol. This pain will be carried forward when migrating to a new protocol when using the awsQueryCompatible trait. | QueryErrorCode

0 commit comments

Comments
 (0)