> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.medicomp.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.medicomp.com/_mcp/server.

# Errors

## 401 - Unauthorized

[HTTP 401](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/401) responses are sent when the authorization credentials are missing, invalid, or have expired. To resolve this error, ensure that you are providing valid credentials. If you are accessing the Quippe sandbox, these credentials can take the form of either [HTTP basic authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Authentication#basic_authentication_scheme) (the username and password that you use to access the sandbox) or a [JSON web token](https://jwt.io) in the `Authorization` HTTP header generated through a request to the [/Quippe/Security/Token](/api-reference/rest/get-quippe-security-token) endpoint; see the [authentication topic](/quippe-rest-api/authentication) for details.

## 500 - Server Error

[HTTP 500](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/500) responses are sent when Quippe encounters an unexpected error while trying to process a request. Details for the error are returned in a [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) (Problem Details for HTTP APIs) compliant format:

```json
{
  "type": "https://httpstatuses.com/500",
  "status": 500,
  "detail": "Error loading the encounter",
  "errors": [
    {
      "message": "Error loading the encounter"
    }
  ]
}
```

If you are hosting Quippe on premise, you can enable settings to return additional details, such as stack traces, in this error data:

**.NET Framework**

* If you want to return the type of the thrown exception, add a `<add key="ShowExceptionTypes" value="true"/>` setting under `/configuration/appSettings` in your application's *web.config* file.
* If you want to return the full stack trace for the exception, add a `<add key="ShowExceptionStackTraces" value="true"/>` setting under `/configuration/appSettings` in your application's *web.config* file.
* If you want to return filename and line number information for Quippe functions in the stack trace, you should also add a `<add key="AppContext.SetSwitch:Switch.System.Diagnostics.IgnorePortablePDBsInStackTraces" value="false"/>` setting under `/configuration/appSettings` in your application's *web.config* file.

**.NET Core or .NET 5.0 or greater**

* If you want to return the type of the thrown exception, either add a `"ShowExceptionTypes": true` property under `QuippeWebServices` in your application's *appsettings.json* file or set the `QuippeWebServices__ShowExceptionTypes` environment variable to `true`.
* If you want to return the full stack trace for the exception, either add a `"ShowExceptionStackTraces": true` property under `QuippeWebServices` in your application's *appsettings.json* file or set the `QuippeWebServices__ShowExceptionStackTraces` environment variable to `true`.

This turns the error details into:

```json
{
  "type": "https://httpstatuses.com/500",
  "status": 500,
  "detail": "Error loading the encounter",
  "errors": [
    {
      "message": "Error loading the encounter",
      "type": "System.Exception",
      "raw": "System.Exception: Error loading the encounter\r\n   at Quippe.Demo.Services.PersonalPatientDataProvider.UpdatePatient(IPatient Patient) in R:\\Source\\Quippe3\\Quippe.Demo.Services\\PersonalPatientDataProvider.cs:line 2113\r\n   at Quippe.UpdatePatientHandler.Execute() in R:\\Source\\Quippe3\\Quippe\\PatientData\\WebServices\\UpdatePatientHandler.vb:line 85\r\n   at Quippe.ResourceHandlerBase.ProcessRequest(ServiceContext Context) in R:\\Source\\Quippe3\\Quippe.Core\\Web\\ResourceHandlerBase.cs:line 131",
      "stackTrace": "   at Quippe.Demo.Services.PersonalPatientDataProvider.UpdatePatient(IPatient Patient) in R:\\Source\\Quippe3\\Quippe.Demo.Services\\PersonalPatientDataProvider.cs:line 2113\r\n   at Quippe.UpdatePatientHandler.Execute() in R:\\Source\\Quippe3\\Quippe\\PatientData\\WebServices\\UpdatePatientHandler.vb:line 85\r\n   at Quippe.ResourceHandlerBase.ProcessRequest(ServiceContext Context) in R:\\Source\\Quippe3\\Quippe.Core\\Web\\ResourceHandlerBase.cs:line 131"
    }
  ]
}
```