dw.svc
Class Result

Represents the result of a service call.
Constants
ERROR
:
String = "ERROR"
Status indicating a general service error.
OK
:
String = "OK"
Status indicating a successful service call.
SERVICE_UNAVAILABLE
:
String = "SERVICE_UNAVAILABLE"
Status indicating the service is unavailable. This includes timeouts, rate limits, and remote server issues.
UNAVAILABLE_CIRCUIT_BROKEN
:
String = "CIRCUIT_BROKEN"
Unavailable reason: No call was made because the circuit breaker prevented it.
UNAVAILABLE_CONFIG_PROBLEM
:
String = "CONFIG_PROBLEM"
Unavailable reason: No call was made because the service was not configured correctly.
UNAVAILABLE_DISABLED
:
String = "DISABLED"
Unavailable reason: No call was made because the service is disabled.
UNAVAILABLE_RATE_LIMITED
:
String = "RATE_LIMITED"
Unavailable reason: No call was made because the rate limit was hit.
UNAVAILABLE_TIMEOUT
:
String = "TIMEOUT"
Unavailable reason: A real call was made but a timeout occurred.
Properties
error
:
Number
(Read Only)
An error-specific code if applicable. For example, this is the HTTP response code for an
HTTPService.
errorMessage
:
String
(Read Only)
An error message on a non-OK status.
mockResult
:
boolean
(Read Only)
The status of whether the response is the result of a "mock" service call.
msg
:
String
(Read Only)
An extra error message on failure (if any).
object
:
Object
(Read Only)
The actual object returned by the service when the status is OK.
status
:
String
(Read Only)
The status. This is "OK" on success. Failure codes include "ERROR" and "SERVICE_UNAVAILABLE".
If the status is "SERVICE_UNAVAILABLE", then the unavailableReason is guaranteed to be non-null.
unavailableReason
:
String
(Read Only)
The reason the status is SERVICE_UNAVAILABLE.
Constructor Summary
Result()
Constructs a new result instance.
Method Summary
getErrorMessage()
:
String
Returns an error message on a non-OK status.
getUnavailableReason()
:
String
Returns the reason the status is SERVICE_UNAVAILABLE.
isMockResult()
:
boolean
Returns the status of whether the response is the result of a "mock" service call.
isOk()
:
boolean
Returns the status of whether the service call was successful.
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβpassing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβthis is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
This isn't just another prep courseβit's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
The Salesforce B2C Commerce Architect certification is a whole different gameβcomplex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
getError
getError()
:
Number
Returns an error-specific code if applicable. For example, this is the HTTP response code for an
HTTPService.
Returns:
Error-specific code (if applicable).
getErrorMessage
getErrorMessage()
:
String
Returns an error message on a non-OK status.
Returns:
Error message.
getMsg
getMsg()
:
String
Returns an extra error message on failure (if any).
Returns:
Error message, or null.
getObject
getObject()
:
Object
Returns the actual object returned by the service when the status is OK.
Returns:
Object returned by the service.
getStatus
getStatus()
:
String
Returns the status. This is "OK" on success. Failure codes include "ERROR" and "SERVICE_UNAVAILABLE".
If the status is "SERVICE_UNAVAILABLE", then the unavailableReason is guaranteed to be non-null.
Returns:
Status code.
getUnavailableReason
getUnavailableReason()
:
String
Returns the reason the status is SERVICE_UNAVAILABLE.
Returns:
Unavailable reason code, or null if the status is not SERVICE_UNAVAILABLE.
See Also:
isMockResult
isMockResult()
:
boolean
Returns the status of whether the response is the result of a "mock" service call.
Returns:
true if this was a mock service call, false otherwise.
isOk
isOk()
:
boolean
Returns the status of whether the service call was successful.
Returns:
true on success, false otherwise.
toString
toString()
:
String
Returns a string representation of the result.
Returns:
a string representation of the result.