Error while requesting a transaction with CXEndCallAction - voip

While requesting a CXTransaction with a CXEndCallAction, the transaction fails with error code
Error Domain=com.apple.CallKit.error.requesttransaction Code=4 "(null)"
I was able to make a CXStartCallAction successfully. Does anyone know what this error means?

The error codes for CallKit are defined in <CallKit/CXError.h>, and in iOS 10 Seed 4, error code 4 for domain com.apple.CallKit.error.requesttransaction is defined as:
CXErrorCodeRequestTransactionErrorUnknownCallUUID = 4,
This indicates that the call UUID for the requested CXEndCallAction did not correspond to an known call. I recommend confirming that the UUID set on the CXEndCallAction matches an existing call.

If you use
func reportCall(with UUID: UUID, updated update: CXCallUpdate)
to update CXStartCallAction with CXCallUpdate you MUST use action.uuid, not action.callUUID.
Later leads to unknownCallUUID error on call ending. In this case
func provider(_ provider: CXProvider, perform action: CXEndCallAction)
does not fire.

Related

Check if order id is invalid using Paypal sdk

If you are familiar with Paypal api, you would know that after the payment gets aprroved you gett redircted to a success page where it has transaction Id peramter for completing the payment.This parameter id can be invalid if the user alter it or it doesn't exists.
When the id is invalid you get this errror RESOURCE_NOT_FOUND.
What I want to do is to check if the id exist. I tried using this method but it is still making the error:
const request = new paypal.orders.OrdersGetRequest(orderID);
const order = await client().execute(request);
Your edited question makes more sense, you are concerned about a "RESOURCE_NOT_FOUND" error after a return from PayPal, and asking how to avoid this error.
A 'Get' request on a bad resource ID will result in the same "RESOURCE_NOT_FOUND" error.
Well, that is expected. Do your Get, and if RESOURCE_NOT_FOUND, there you go -- that's the answer to your check -- it's not valid.

Customizing Validate Node Error Message in OSB 12c

When we add the Validate Node in the OSB 12c for validating the incoming request against XSD, and if the validation fails ,
in some fault messages the field name that is causing the validation error is displayed. But only for decimal values , fault message is just saying Invalid decimal Value and no mention about the field from where the error is thrown. Can we overcome this issue
I am not sure this is direct solution. But there is a workaround which may suit your need
Create an XQuery which validates the payload and throws custom error messages
eg: for xml element which should contain decimal value abc
if ($a instance of xs:long)
then ()
else (fn:error(xs:QName('Your error code'), 'your error message'))
This is a suitable method if the payload is small.
https://gibaholms.wordpress.com/2013/09/24/osb-throw-exception-in-xquery1
If the payload is large
identify the fields which are supposed to have these type of issues.
Create an XQuery for validating these fields with error messages.
Use validate node inside a stage and use a stage error handler
Validate the payload using xquery inside stage error handler

Loopback 3 discards error information on multiple validation errors, turning 422 to 500, how can I solve that?

I'm migrating from Loopback 2 tot 3.
I currently have an issue with validation errors and strong-error-handler
When I post a bulk create which results in multiple validation errors, those get returned as an array of ValidationErrors.
Those errors get grouped by strong-error handler in a 500 internal server error, which is how it was before, but the details of the errors get discarded, when debug is set to false.
In my example I upload an array of tags, but for each tag, a uniqueness validation is executed. When 2 or more tags are already in the database, I have an array of errors, instead of a single validation error
I need a way to determine why the validation failed on the client side, but the details of the errors are discarded now.
Am I doing something wrong here, or should this be considered as a bug?
From the strongloop error handler documentation in loopback,
In production mode, strong-error-handler omits details from error responses to prevent leaking sensitive information:
More information
For 5xx errors, the output contains only the status code and the status name from the HTTP specification.
For 4xx errors, the output contains the full error message (error.message) and the contents of the details property (error.details) that ValidationError typically uses to provide machine-readable details about validation problems. It also includes error.code to allow a machine-readable error code to be passed through which could be used, for example, for translation.
Am I doing something wrong here, or should this be considered as a bug?
No this is the intended behaviour
Safe error fields
You can set the stack trace as "safe-error-field" so that it will be displayed in production.
For example, the stack field is not displayed by default if you run the loopback in production mode.
If you still want to display the stack field, then change the config json in the server/middleware.json
"final:after": {
"strong-error-handler": {
"params": {
"safeFields": ["stack"]
}
}
}

StackExchange Redis Client StringSet return false?

We have been using StackExchange Redis .Net client for several months without issue. Our logs indicate that StringSet returned false thousands of time over the course of an hour recently, but it is working as expected again.
I can't find what FALSE means anywhere. I assume this means that the value was not put in cache, but if that is correct, how do I tell why? The client is not throwing an exception. Can someone show me the API Specification that describes the return value and how to troubleshoot?
We are running against Redis in Azure if that matters.
result = cache.StringSet(fullKey, value, GetCacheTime(cacheType));
if (!result)
{
if (_logger != null)
{
_logger.LogError( "Failed to Set Cache");
}
}
http://redis.io/commands/set
Simple string reply: OK if SET was executed correctly. Null reply: a
Null Bulk Reply is returned if the SET operation was not performed
becase the user specified the NX or XX option but the condition was
not met.
Though it looks like you are using SETEX (http://redis.io/commands/setex) are you setting a valid timespan as the third argument?
SETEX is atomic, and can be reproduced by using the previous two
commands inside an MULTI / EXEC block. It is provided as a faster
alternative to the given sequence of operations, because this
operation is very common when Redis is used as a cache. An error is
returned when seconds is invalid.

DataServiceRequestException was unhandled by user code. An error occurred while processing this request

DataServiceRequestException was unhandled by user code. An error occurred while processing this request.
This is in relation to the previous post I added
public void AddEmailAddress(EmailAddressEntity emailAddressTobeAdded)
{
AddObject("EmailAddress", emailAddressTobeAdded);
SaveChanges();
}
Again the code breaks and gives a new exception this time. Last time it was Storage Client Exception, now it is DataServiceRequestException. Code breaks at SaveChanges.
Surprisingly, solution is same. CamelCasing is not supported. So the code works if "EmailAddress" is changed to "Emailaddress" or "emailaddress"
More details
http://weblogs.asp.net/chanderdhall/archive/2010/07/10/dataservicerequestexception-was-unhandled-by-user-code-an-error-occurred-while-processing-this-request.aspx
Because you've tagged this with "azure" and "table," I'm going to assume this code results in a call to Windows Azure tables. If so, I can assure you that camel casing table names is indeed supported. However, the string you pass to AddObject has to match a table that you've created, so make sure the code where you create the table is using the same casing.

Resources