Class BadRequestException

All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<BadRequestException.Builder,BadRequestException>

@Generated("software.amazon.awssdk:codegen") public final class BadRequestException extends TranscribeException implements ToCopyableBuilder<BadRequestException.Builder,BadRequestException>

Your request didn't pass one or more validation tests. This can occur when a parameter has an invalid value, when you combine parameters in a way that isn't supported, when the entity you're trying to delete doesn't exist, or if it's in a non-terminal state (such as IN PROGRESS). See the exception message field for more information.

See Also:
  • Method Details

    • toBuilder

      public BadRequestException.Builder toBuilder()
      Description copied from class: AwsServiceException
      Create a AwsServiceException.Builder initialized with the properties of this AwsServiceException.
      Specified by:
      toBuilder in interface ToCopyableBuilder<BadRequestException.Builder,BadRequestException>
      Overrides:
      toBuilder in class TranscribeException
      Returns:
      A new builder initialized with this config's properties.
    • builder

      public static BadRequestException.Builder builder()
    • serializableBuilderClass

      public static Class<? extends BadRequestException.Builder> serializableBuilderClass()
    • reason

      public BadRequestExceptionReason reason()

      A code that identifies why the audio in your request was rejected. Currently, TranscribeAudio returns this field, and only for problems with your audio. It isn't returned for other validation errors.

      Possible values:

      • audioTooLong: The audio is longer than the maximum duration of 1 hour.

      • audioTooShort: The audio is shorter than 0.5 seconds.

      • audioFileTooLarge: The audio is larger than the maximum size.

      • unsupportedAudioFormat: The media format isn't supported.

      • unsupportedChannelCount: You enabled ChannelIdentification and the audio has more than two channels.

      • invalidAudio: Amazon Transcribe couldn't decode the audio.

      • mediaDownloadFailed: Amazon Transcribe couldn't download the audio at your MediaFileUri .

      If the service returns an enum value that is not available in the current SDK version, reason will return BadRequestExceptionReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from reasonAsString().

      Returns:
      A code that identifies why the audio in your request was rejected. Currently, TranscribeAudio returns this field, and only for problems with your audio. It isn't returned for other validation errors.

      Possible values:

      • audioTooLong: The audio is longer than the maximum duration of 1 hour.

      • audioTooShort: The audio is shorter than 0.5 seconds.

      • audioFileTooLarge: The audio is larger than the maximum size.

      • unsupportedAudioFormat: The media format isn't supported.

      • unsupportedChannelCount: You enabled ChannelIdentification and the audio has more than two channels.

      • invalidAudio: Amazon Transcribe couldn't decode the audio.

      • mediaDownloadFailed: Amazon Transcribe couldn't download the audio at your MediaFileUri.

      See Also:
    • reasonAsString

      public String reasonAsString()

      A code that identifies why the audio in your request was rejected. Currently, TranscribeAudio returns this field, and only for problems with your audio. It isn't returned for other validation errors.

      Possible values:

      • audioTooLong: The audio is longer than the maximum duration of 1 hour.

      • audioTooShort: The audio is shorter than 0.5 seconds.

      • audioFileTooLarge: The audio is larger than the maximum size.

      • unsupportedAudioFormat: The media format isn't supported.

      • unsupportedChannelCount: You enabled ChannelIdentification and the audio has more than two channels.

      • invalidAudio: Amazon Transcribe couldn't decode the audio.

      • mediaDownloadFailed: Amazon Transcribe couldn't download the audio at your MediaFileUri .

      If the service returns an enum value that is not available in the current SDK version, reason will return BadRequestExceptionReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from reasonAsString().

      Returns:
      A code that identifies why the audio in your request was rejected. Currently, TranscribeAudio returns this field, and only for problems with your audio. It isn't returned for other validation errors.

      Possible values:

      • audioTooLong: The audio is longer than the maximum duration of 1 hour.

      • audioTooShort: The audio is shorter than 0.5 seconds.

      • audioFileTooLarge: The audio is larger than the maximum size.

      • unsupportedAudioFormat: The media format isn't supported.

      • unsupportedChannelCount: You enabled ChannelIdentification and the audio has more than two channels.

      • invalidAudio: Amazon Transcribe couldn't decode the audio.

      • mediaDownloadFailed: Amazon Transcribe couldn't download the audio at your MediaFileUri.

      See Also:
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Overrides:
      sdkFields in class SdkServiceException
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.