
commonMain.aws.sdk.kotlin.services.s3.serde.XmlErrorUtils.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.serde
import aws.smithy.kotlin.runtime.serde.DeserializationException
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
/**
* Handle [unwrapped](https://smithy.io/2.0/aws/protocols/aws-restxml-protocol.html#error-response-serialization) error responses (restXml.noErrorWrapping == true)
*/
internal fun unwrapXmlErrorResponse(root: XmlTagReader): XmlTagReader {
if (root.tagName != "Error") {
throw DeserializationException("invalid error, expected ; found `${root.tag}`")
}
return root
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy