Class NoDocumentException

All Implemented Interfaces:
Serializable

public final class NoDocumentException extends UncheckedIOException
generate got a 2xx answer that carries no XML document.

A 2xx from generate must hold the generated XML. A server older than pain001 0.0.87 answers a refused file with HTTP 200 and success: false; a broken proxy or server can answer 2xx with no xml. Both raise this rather than return a response without a document, so a returned GenerateResponse always carries the XML. It is a broken reply, not the server refusing the data, so it extends UncheckedIOException like the other transport failures; it is neither a Pain001ApiException nor a GenerationRefusedException. The message names only the status, method and path, never the body, so it is safe to log.

See Also:
  • Constructor Details

    • NoDocumentException

      public NoDocumentException(int status, String method, String path)
      Creates the exception.
      Parameters:
      status - the 2xx HTTP status the server answered
      method - the HTTP method of the request
      path - the path of the request
  • Method Details

    • status

      public int status()
      The 2xx HTTP status code the server answered.
      Returns:
      a status from 200 to 299