Baidut Constants
Members
-
<static> errorCode :Object
-
Error code.
Type:
- Object
Properties:
Name Type Description internetConnectionIssue
Number Suspect to be a problem about Internet connection. User might not be able to connect to the Internet.
responseIsNull
Number Response is null.
jsonParsedError
Number JSON parse error.
appIdNotSet
Number App Id not set yet.
keyNotSet
Number Key is not set yet.
requestTimedOut
Number Requested time out
systemError
Number System error
unauthorizedUsers
Number Unauthorized users
requiredParameterIsNull
Number Required parameter is null
clientIPIllegal
Number Client IP illegal
signatureError
Number Signature error
restrictedAccessFrequency
Number Restricted access frequency
targetLanguageNotSupported
Number Target language is not supported
accountBalanceInsufficient
Number Account balance is insufficient
longQueryRequestFrequently
Number Long query request frequently
-
<static> errorMessage :Object
-
Error message
Type:
- Object
Properties:
Name Type Description internetConnectionIssue
String Error message for internet connection issue
responseIsNull
String Error message for response is null
jsonParsedError
String Error message for JSON parsed error
appIdNotSet
String App Id was not set yet. Set it via Baidut.builder.
keyNotSet
String Key was not set yet. Set it via Baidut.builder.
requestTimedOut
String Error message for Requested time out
systemError
String Error message for System error
unauthorizedUsers
String Error message for Unauthorized users
requiredParameterIsNull
String Error message for Required parameter is null
clientIPIllegal
String Error message for Client IP illegal
signatureError
String Error message for Signature error
restrictedAccessFrequency
String Error message for Restricted access frequency
targetLanguageNotSupported
String Error message for Target language is not supported
accountBalanceInsufficient
String Error message for Account balance is insufficient
longQueryRequestFrequently
String Error message for Long query request frequently
Methods
-
<static> error(code, options)
-
Get Baidu's related error object from specified error code It it's error for http/https connection, you should not use this function. Create error object using Error class and response's error code by yourself.
Parameters:
Name Type Description code
Number error code
options
Object (optional) options as Object
It can be
{additional_msg
: String = additional of error message. If you set this, this additional message will combined with base error message.
}Returns:
Newly created error object using Error class
- Type
- Object