---
Product: Aspose.PDF
Platform: go
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/go/apierror
---

# APIError

## Overview

`APIError` is a type in Aspose.PDF FOSS for Go.

APIError is returned when the AI endpoint answers with a non-2xx status.

This type declares 1 method for APIError objects in Go programs.
Available methods include: `Error`.
Public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.
Properties: `Code`, `Message`, `Status`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `Status` | `int` | Read/Write | Gets the status. |
| `Code` | `string` | Read/Write | Gets the code. |
| `Message` | `string` | Read/Write | Gets the message. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Error()` → `string` | Returns the error. |

## See Also

- [Aspose.PDF — Enterprise API Reference](https://reference.aspose.com/pdf/)