HTTP 400 response code when DB connection error is encountered

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Summary

      When an update issue rest call encounters a DB connection error for cloud, an HTTP 400 response code is returned instead of a server error response code or a 429 rate limit code.

      Steps to Reproduce

      Send a PUT https://<site>.atlassian.net/rest/api/2/issue/ call against a site that is currently overloaded.

      Expected Results

      • A 500 server error or 429 rate limit error should be returned to the client.
      • Have a mechanism to handle this scenario instead of throwing 400 response back for the edit issue call.

      Actual Results

      An HTTP 400 (Bad request) response is sent to the client.

      400	PUT	/rest/api/2/issue/
      
      Exception occurred editing issue: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: Exception while inserting the following entity: [GenericEntity:CustomFieldValue][parentkey,null][customfield,xxxxxx][issue,xxxxx][xxxxxxxxxx, xxxxxxxxx] 
      (Unable to establish a connection with the database. 
      (PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection)) 
      

            Assignee:
            Unassigned
            Reporter:
            Ramon M (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: