# Error Reporting V1beta1 API - Class Google::Cloud::ErrorReporting::V1beta1::ErrorContext (v0.17.0)

0.17.0 (latest) 0.16.0 0.15.1 0.14.0 0.13.1 0.12.0 0.11.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.5 Reference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ErrorContext.

A description of the context in which an error occurred.
This data should be provided by the application when reporting an error,
unless the
error report has been generated automatically from Google App Engine logs.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #http_request

    def http_request() -> ::Google::Cloud::ErrorReporting::V1beta1::HttpRequestContext

**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::HttpRequestContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-HttpRequestContext)) --- The HTTP request which was processed when the error was triggered.

### #http_request=

    def http_request=(value) -> ::Google::Cloud::ErrorReporting::V1beta1::HttpRequestContext

**Parameter**

- **value** ([::Google::Cloud::ErrorReporting::V1beta1::HttpRequestContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-HttpRequestContext)) --- The HTTP request which was processed when the error was triggered.
**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::HttpRequestContext](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-HttpRequestContext)) --- The HTTP request which was processed when the error was triggered.

### #report_location

    def report_location() -> ::Google::Cloud::ErrorReporting::V1beta1::SourceLocation

**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::SourceLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-SourceLocation)) --- The location in the source code where the decision was made to report the error, usually the place where it was logged. For a logged exception this would be the source line where the exception is logged, usually close to the place where it was caught.

### #report_location=

    def report_location=(value) -> ::Google::Cloud::ErrorReporting::V1beta1::SourceLocation

**Parameter**

- **value** ([::Google::Cloud::ErrorReporting::V1beta1::SourceLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-SourceLocation)) --- The location in the source code where the decision was made to report the error, usually the place where it was logged. For a logged exception this would be the source line where the exception is logged, usually close to the place where it was caught.
**Returns**

- ([::Google::Cloud::ErrorReporting::V1beta1::SourceLocation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-SourceLocation)) --- The location in the source code where the decision was made to report the error, usually the place where it was logged. For a logged exception this would be the source line where the exception is logged, usually close to the place where it was caught.

### #user

    def user() -> ::String

**Returns**

- (::String) --- The user who caused or was affected by the crash. This can be a user ID, an email address, or an arbitrary token that uniquely identifies the user. When sending an error report, leave this field empty if the user was not logged in. In this case the Error Reporting system will use other data, such as remote IP address, to distinguish affected users. See `affected_users_count` in `ErrorGroupStats`.

### #user=

    def user=(value) -> ::String

**Parameter**

- **value** (::String) --- The user who caused or was affected by the crash. This can be a user ID, an email address, or an arbitrary token that uniquely identifies the user. When sending an error report, leave this field empty if the user was not logged in. In this case the Error Reporting system will use other data, such as remote IP address, to distinguish affected users. See `affected_users_count` in `ErrorGroupStats`.
**Returns**

- (::String) --- The user who caused or was affected by the crash. This can be a user ID, an email address, or an arbitrary token that uniquely identifies the user. When sending an error report, leave this field empty if the user was not logged in. In this case the Error Reporting system will use other data, such as remote IP address, to distinguish affected users. See `affected_users_count` in `ErrorGroupStats`.