Skip to content

Commit 1b3828a

Browse files
authored
Merge pull request #9 from dsnopek/fix-error-docs
Document `MetaPlatformSDK_Message.error` rather than `get_error()`
2 parents ce286be + 46a7178 commit 1b3828a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

doc_classes/MetaPlatformSDK_Error.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</brief_description>
66
<description>
77
Represents an error received from the Meta Platform SDK.
8-
Retrieved from [method MetaPlatformSDK_Message.get_error].
8+
Retrieved from [member MetaPlatformSDK_Message.error].
99
</description>
1010
<tutorials>
1111
</tutorials>

doc_classes/MetaPlatformSDK_Message.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
A message sent to the current app from the Meta Platform SDK.
88
Messages can be received from asynchronous requests via the [signal MetaPlatformSDK_Request.completed] signal, or from notifications via the [signal MetaPlatformSDK.notification_received] signal.
99
Each message contains a single payload depending on the [member type]. Regardless of the type, the [member data] property will contain the payload. However, if you want to write fully type-safe code, you can instead call the method dedicated to the type of the payload.
10-
Before attempting to access the payload, call [method is_error] or [method is_success] to determine if the message was successful or not. When unsuccessful, call [method get_error] to get the full error details.
10+
Before attempting to access the payload, call [method is_error] or [method is_success] to determine if the message was successful or not. When unsuccessful, check [member error] to get the full error details.
1111
</description>
1212
<tutorials>
1313
</tutorials>
@@ -156,12 +156,6 @@
156156
Returns a [MetaPlatformSDK_DestinationArray] if that is the payload of this message; otherwise, it returns [code]null[/code].
157157
</description>
158158
</method>
159-
<method name="get_error" qualifiers="const">
160-
<return type="MetaPlatformSDK_Error" />
161-
<description>
162-
Returns a [MetaPlatformSDK_Error] if [method is_error] returns [code]true[/code]; otherwise, it returns [code]null[/code].
163-
</description>
164-
</method>
165159
<method name="get_group_presence_join_intent" qualifiers="const">
166160
<return type="MetaPlatformSDK_GroupPresenceJoinIntent" />
167161
<description>
@@ -467,6 +461,9 @@
467461
<member name="data" type="Variant" setter="" getter="get_data" default="null">
468462
Contains the payload of this message.
469463
</member>
464+
<member name="error" type="MetaPlatformSDK_Error" setter="" getter="get_error">
465+
Contains a [MetaPlatformSDK_Error] if [method is_error] returns [code]true[/code]; otherwise, it's [code]null[/code].
466+
</member>
470467
<member name="request_id" type="int" setter="" getter="get_request_id" default="0">
471468
The unique request ID for this message.
472469
</member>

0 commit comments

Comments
 (0)