## TL;DR

The only thing I can recommend is putting the following error handling code inside your RPC: "error": { "404": { "type": "DataError", "message": "No departments found. --ServiceName-- marks this case as an error - please switch to the Map mode to save." } } That will at least help the user know what's going on when they try to set up the module input. There is no way to mark a response status greater than 399 as OK.

## Fix

1. The only thing I can recommend is putting the following error handling code inside your RPC: "error": { "404": { "type": "DataError", "message": "No departments found. --ServiceName-- marks this case as an error - please switch to the Map mode to save." } } That will at least help the user know what's going on when they try to set up the module input.
   Expected: You get the expected result; the problem is gone.

## When to use

- You are dealing with this situation.
- The symptom matches: Creating RPC through intergromat apps returns 404.

## When NOT to use

- Unrelated issues with a different cause.
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported per the linked source.

## Variant phrasings

### Creating RPC through intergromat apps returns 404

## Why it happens

Stack Overflow question (score 2, has accepted answer): I am trying to create an RPC that lists departments in a service. However, the endpoint for listing all departments returns an HTTP 404 error if no departments exist. It seems that the 'valid' directive does not work when the status code is greater than 399 . Is there a workaround for this?

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.