Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-2063

API 2.0: GET call towards /align/api/2/Users/<id> or /align/api/2/Users renders HTTP 400 in Swagger and throws SqlException 0x80131904 in Splunk

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 10.80
    • 10.77, 10.78, 10.79
    • REST API
    • None
    • 1
    • Severity 3 - Minor

    Description

      Issue Summary

      GET call towards /align/api/2/Users/<id> or /align/api/2/Users renders HTTP 400 Bad Request in Swagger and throws SqlException 0x80131904 in Splunk

      Steps to Reproduce

      • Unable to repro in labs
      • Noticed to manifest when a specific UserID has several hundreds of assigned teams

      Expected Results

      • No errors are thrown at all and the corresponding JSON response is returned

      Actual Results

      • An HTTP 400 BadRequest is thrown in Swagger
        {
          "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
          "title": "Bad Request",
          "status": 400,
          "traceId": "|7ef70a9c-4cbf2c64de38cfac."
        }
        
      • A SqlException 0x80131904 is thrown in Splunk
        { [-]
           Exception: System.Data.SqlClient.SqlException (0x80131904): The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request.
           at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
           at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
           at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
           at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
           at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
           at System.Data.SqlClient.SqlDataReader.get_MetaData()
           at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
           at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite, String method)
           at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
           at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
           at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
           at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
           at Dapper.SqlMapper.ExecuteReaderWithFlagsFallback(IDbCommand cmd, Boolean wasClosed, CommandBehavior behavior) in C:\projects\dapper\Dapper\SqlMapper.cs:line 1053
           at Dapper.SqlMapper.QueryImpl[T](IDbConnection cnn, CommandDefinition command, Type effectiveType)+MoveNext() in C:\projects\dapper\Dapper\SqlMapper.cs:line 1081
           at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
           at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
           at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable`1 commandTimeout, Nullable`1 commandType) in C:\projects\dapper\Dapper\SqlMapper.cs:line 723
           at MicroOrm.Dapper.Repositories.DapperRepository`1.FindAll(Expression`1 predicate, IDbTransaction transaction) in C:\projects\awesomesauce-mlaxn\AgileCraft\API\MicroOrm.Dapper.Repositories\DapperRepository.FindAll.cs:line 27
           at AgileCraft.Services.UserService.SimpleGet(UserFilter filter) in C:\projects\awesomesauce-mlaxn\AgileCraft\API\AgileCraft.Services\UserService.cs:line 440
           at AgileCraft.Services.UserService.Get(UserFilter filter) in C:\projects\awesomesauce-mlaxn\AgileCraft\API\AgileCraft.Services\UserService.cs:line 257
           at AgileCraft.Services.UserService.Get(Int32 id) in C:\projects\awesomesauce-mlaxn\AgileCraft\API\AgileCraft.Services\UserService.cs:line 249
           at AgileCraft.Api.Controllers.BaseController`2.Get(String message, String errorMessage, Int32 id) in C:\projects\awesomesauce-mlaxn\AgileCraft\API\AgileCraft.Api\Controllers\BaseController.cs:line 79
        ClientConnectionId:5d9f3d48-c66f-43e0-b694-779dee6cd8f4
        Error Number:8003,State:1,Class:16
           Level: Error
           MessageTemplate: Cannot get user with id 6.
           Properties: { [-]
             ActionId: a0488fbc-9957-4cac-8192-914eab699064
             ActionName: AgileCraft.Api.Controllers.UsersController.Get (AgileCraft.Api)
             Build: 10.78.0.8457
             ParentId:
             Product: AgileCraft.Api
             RequestId: 80005856-0000-d800-b63f-84710c7967bb
             RequestPath: /rest/align/api/2/Users/6
             SourceContext: AgileCraft.Api.Controllers.UsersController
             SpanId: |7ef70a9c-4cbf2c64de38cfac.
             TraceId: 7ef70a9c-4cbf2c64de38cfac
           }
           RenderedMessage: Cannot get user with id 6.
           Timestamp: 2020-09-17T10:49:40.4361565-04:00
        }
        

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

      Attachments

        Issue Links

          Activity

            People

              kforeman@atlassian.com Kyle Foreman
              rcortez@atlassian.com Rodrigo Cortez
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync