Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-70909

HTTP Status 403 returned for DB connection error when calling REST APIs

    XMLWordPrintable

    Details

      Description

      Summary

      Bulk rest api calls that fails with DB connection errors is returning a 403 response code to the client.

      1. Content response is even more misleading :

      <html>
      <head>
          <title>Forbidden (403)</title> 
      <!--[if IE]><![endif]-->
      <script type="text/javascript" >
      

      2. Jira application logs indicates DB connection error from too many request within a short period of time.

      ERROR	com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper	
      Uncaught exception thrown by REST service: org.ofbiz.core.entity.GenericDataSourceException: 
      Unable to establish a connection with the database. (PSQL_TOO_MANY_CONNECTIONS Exception already occurred in this workcontext, skipping next getConnection)
      

      Steps to Reproduce

      1. Call REST APIs in continuous succession

      Expected Results

      If the rate limit is hit, the status 429. Throttling limit state should be returned in headers like here

      Actual Results

      HTTP 403 response code returned with the following content

      <html>
      <head>
          <title>Forbidden (403)</title> 
      <!--[if IE]><![endif]-->
      <script type="text/javascript" >
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              rmacalinao Ramon Macalinao
              Votes:
              34 Vote for this issue
              Watchers:
              57 Start watching this issue

                Dates

                Created:
                Updated: