---
title: "Error Messages"
description: "Error messages for the Portfolio X-Ray API."
url: "https://developer-beta.morningstar.com/portfolio-xray-api/error-messages"
image: "https://developer-beta.morningstar.com/_og/d/c_Ocean.takumi,title_~RXJyb3IgTWVzc2FnZXMgfCBQb3J0Zm9saW8gWC1SYXkgQVBJ,description_Error+messages+for+the+Portfolio+X-Ray+API.,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiMwMDAwMDAifX19,p_Ii9wb3J0Zm9saW8teHJheS1hcGkvZXJyb3ItbWVzc2FnZXMi,s_rCgH3uxwiYE5D4jd.png"
---

-   [APIs](https://developer-beta.morningstar.com/apis)
-   [API Catalog](https://developer-beta.morningstar.com/api-catalog)
-   [API Assistant MCP Server](https://developer-beta.morningstar.com/api-assistant-mcp)
-   [Guides](https://developer-beta.morningstar.com/api-guides)
-   [Trial Access](https://developer-beta.morningstar.com/trial-access)

# Portfolio X-Ray API

Build Portfolio X-Ray APIs into your digital experience for quick investment and earnings summaries.

# Errors

[View Markdown](https://developer-beta.morningstar.com/portfolio-xray-api/error-messages.md)[Download Markdown](https://developer-beta.morningstar.com/portfolio-xray-api/error-messages.md)

A `400` response contains a `Message` and a `SpecificErrorStatus` array. Each entry in the array has an `ErrorCode` and an `ErrorMessage`.

## [Error Response Format](#error-response-format)

```json
{
  "Message": "The request is invalid.",
  "SpecificErrorStatus": [
    {
      "ErrorCode": "40015",
      "ErrorMessage": "Portfolio does not have any valid holdings. Invalid portfolio name: TestPortfolio1. Invalid Holdings: TradingSymbol:DODGX1."
    }
  ]
}
```

## [Error Codes](#error-codes)

| Error Code | Error Message                                                                    |
| :--------- | :------------------------------------------------------------------------------- |
| 40024      | RequestSettings.HypoCalculationSettings is required.                             |
| 40026      | RequestSettings.PortfolioPerformanceEndDate is required when AnalysisDateTimePeriod is set to CustomDate. |
| 40027      | Portfolio and holdings fees frequencies do not match.                            |
| 40031      | Portfolio and holdings AssetFeeFrequency values do not match.                    |
| 40032      | Portfolio and holdings AssetFeeType values do not match.                         |
| 40033      | Portfolio and holdings FrontLoadType values do not match.                        |
| 40034      | Portfolio CustomFeeType and holdings LoadFeeType values do not match.            |
| 40044      | Enter a valid View Id.                                                           |
| 40045      | No portfolio(s) present in the request. Invalid request.                         |