# Google Cloud Web Security Scanner V1 Client - Class ScanRunErrorTrace (1.2.0)

1.2.0 (latest) 1.1.2 1.0.5 0.8.5 0.7.18 Reference documentation and code samples for the Google Cloud Web Security Scanner V1 Client class ScanRunErrorTrace.

Output only.

Defines an error trace message for a ScanRun.

Generated from protobuf message `google.cloud.websecurityscanner.v1.ScanRunErrorTrace`

## Namespace

Google \\ Cloud \\ WebSecurityScanner \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ code` | `int` Output only. Indicates the error reason code. |
| `↳ scan_config_error` | `https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanConfigError` Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error message encountered during scan configuration validation that is performed before each scan run. |
| `↳ most_common_http_error_code` | `int` Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most common HTTP error code, if such is available. For example, if this code is 404, the scan has encountered too many NOT_FOUND responses. |

### getCode

Output only. Indicates the error reason code.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanRunErrorTrace.Code). |

### setCode

Output only. Indicates the error reason code.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Code](https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanRunErrorTrace.Code). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getScanConfigError

Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
message encountered during scan configuration validation that is performed
before each scan run.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanConfigError|null` |   |

### hasScanConfigError

### clearScanConfigError

### setScanConfigError

Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
message encountered during scan configuration validation that is performed
before each scan run.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest/V1.ScanConfigError` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMostCommonHttpErrorCode

Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
common HTTP error code, if such is available. For example, if this code is
404, the scan has encountered too many NOT_FOUND responses.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setMostCommonHttpErrorCode

Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
common HTTP error code, if such is available. For example, if this code is
404, the scan has encountered too many NOT_FOUND responses.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |