Skip to content

HTTP Status Codes

Carson Cook (14CDWC) requested to merge carsoncook/i49/httpStatusCode into staging

Description

Introduces proper HTTP status codes based on errors in QPlan. The HTTP response code is made specific to the issue, whether it was a request error (400), internal db error (500), improper file upload (415), etc.

Creates the QPlanError hierarchy. These are specific errors thrown in specific situations that specify the HTTP return code. When this error is caught its code is used. If the error is not a QPlanError then a generic 500 code is used.

Resolves #49 (closed)

Type

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking change which improves existing functionality)
  • Breaking change (fix, feature, or enhancement that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

More information can be found here

Merge request reports