Error with REST API Call

Hi all,

We are trying to post to Web/Session with these parameters: 

{
"IpAddress": "127.0.0.1",
"BusinessUnitId": 1
}

and we got this error: 

[
{
"Code": null,
"Description": "Invalid Source_no",
"Details": " at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at Tessitura.Service.DataAccess.Repositories.Web.SessionRepository.CreateSession(String ipAddress, Int32 businessUnit, Int32 batchNo, Int32 modeOfSale, Int32 promotionCode, String organization, Boolean businessFacing)\r\n at Tessitura.Service.Impl.Web.SessionService.CreateSession(SessionRequestEntity request)\r\n at Tessitura.Service.Web.Controllers.Web.SessionController.<>c__DisplayClass4_0.<CreateSession>b__0()\r\n at Tessitura.Service.Web.Controllers.Base.BaseController.RunInTransaction[T](Func`1 func)\r\n at Tessitura.Service.Web.Controllers.Web.SessionController.CreateSession(SessionRequest request)\r\n at lambda_method(Closure , Object , Object[] )\r\n at .....
}
]




At first, I thought the source numbers in T_DEFAULTS are expired, but upon checking, they are still ok because we just did a LIVE to TEST copy down. If they are expired on LIVE, then we would get noticed immediately. 

Has any of you come across this error before? Please advise on how to get past it. Thank you!

Best,
Tom Nguyen 
  • Hi Tom,

    I don't know if this applies in your situation, but I thought I would mention it just in case. In certain versions of Tessitura, the REST services will still look for a valid/active source in the Default Source_no T_DEFAULTS setting of the Tessitura Web parent table when creating a session even if your web user group is set to use a different parent table. Since we don't use the Tessitura Web parent table at all, we solved this by creating a dummy source code that never expires and assigned it to the Default Source_no setting of the Tessitura Web parent table.

    Of course, if you are using the Tessitura Web parent table, then this won't solve your particular problem; however, I thought I would mention it.

    Thanks,

    David

  • I believe there was also a period where Tessitura supported a list of default sources ("1,2,3") while the API server did not, but that would require you not being updated to v15.1.

    One other possibility (an outside chance) is that your web user doesn't have permissions to use that source: forget where those are set, maybe at the campaign level?  It would be a Control Group thing.