Fix for IVLE API /Delta_ModuleTimeTable endpoint returning stack trace as data on exception
Fix for IVLE API /Delta_ModuleTimeTable endpoint returning stack trace as data on exception

Example:
{
  ModuleCode: 'System.ApplicationException: SQL Information: <br />\r\nSQL<br />\r\nselect * from Module_TimeTable where LastModified >= @LastModified<br />\r\nParameters<br />\r\n<br />\r\nLastModified: 4/17/2015 5:30:19 AM ---> System.Data.SqlClient.SqlException: Login failed for user \'admAPIDatasets\'.\r\n   at System.Data.SqlClient.SqlInternalConnection.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.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)\r\n   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)\r\n   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)\r\n   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)\r\n   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)\r\n   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)\r\n   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)\r\n   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)\r\n   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)\r\n   at System.Data.SqlClient.SqlConnection.Open()\r\n   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)\r\n   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)\r\n   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)\r\n   at System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)\r\n   at System.Web.UI.WebControls.SqlDataSource.Select(DataSourceSelectArguments arguments)\r\n   at Globals.DataLayer_SQLServer.ExecuteDataTable(SqlCommand cmd, String DBConn) in d:\\IIS\\Websites\\IVLE\\App_Code\\Globals\\Database DataLayers\\DataLayer_SQLServer.cs:line 151\r\n   --- End of inner exception stack trace ---\r\n   at Globals.DataLayer_SQLServer.ExecuteDataTable(SqlCommand cmd, String DBConn) in d:\\IIS\\Websites\\IVLE\\App_Code\\Globals\\Database DataLayers\\DataLayer_SQLServer.cs:line 169\r\n   at PublicAPI_Delta.ViewDelta(String Source, Int32 LastModified_Seconds, String ModuleCode) in d:\\IIS\\Websites\\IVLE\\App_Code\\API\\public\\lapi_deltadatasets.cs:line 123\r\n   at PublicAPI_LAPI.Delta_ModuleTimeTable(String APIKey, String AuthToken, Int32 LastModified, String ModuleCode) in d:\\IIS\\Websites\\IVLE\\App_Code\\API\\public\\lapi_deltadatasets.cs:line 63',
  ClassNo: null,
  LessonType: null,
  WeekCode: null,
  WeekText: null,
  DayCode: null,
  DayText: null,
  StartTime: null,
  EndTime: null,
  Venue: null,
  AcadYear: null,
  Semester: null,
  LastModified: '/Date(-62135596800000)/',
  LastModified_js: '0001-01-01T00:00:00',
  isDelete: false
}

nusmodifications/nusmods,nusmodifications/nusmods,nusmodifications/nusmods-api,nusmodifications/nusmods-api,nusmodifications/nusmods,nusmodifications/nusmods