This message was deleted.
# marvin-ai
s
This message was deleted.
m
Error: status_code: 529, model_name: claude-3-5-sonnet-latest, body: {'type': 'error', 'error': {'type': 'overloaded_error', 'message': 'Overloaded'}}
thought for 69.8 seconds
thought for 61.2 seconds
Based on the research and looking at your code, I can identify the issue. The problem is in how you're referencing the block in the parameters. When using block references in deployment parameters, you need to use a slightly different syntax. Here's how to fix it: 1. Current (Incorrect) Syntax:
Copy code
python
parameters=dict(
    source_block="{{ prefect.blocks.serverwithpublickeyauthblock.esa-data-exchange-server }}",
),
2. Correct Syntax:
Copy code
python
parameters=dict(
    source_block="${{ prefect.blocks.serverwithpublickeyauthblock.esa-data-exchange-server }}"
),
The key differences are: 1. Use
${{  }}
instead of just
{{  }}
for block references in deployment parameters 2. Make sure there are no spaces between the
$
and the
{{
This syntax is specifically required when programmatically creating deployments. The
${{ }}
syntax tells Prefect to resolve the block reference at runtime rather than trying to resolve it during deployment creation. Also, to ensure everything is set up correctly: 1. Verify that your block is properly registered and available in your Prefect server/cloud 2. Double-check that the block name exactly matches what's in your Prefect server (including case sensitivity) 3. Ensure the block type slug matches exactly what's registered If you're still getting the 422 error after making these changes, could you: 1. Confirm the exact name of your registered block as it appears in the UI 2. Share the full block type slug (you can get this by looking at the block in the UI) This will help me provide more specific guidance if needed.
I can see the issue in your code. The problem is that you're passing the block reference as a string (with quotes) in the parameters. When using template syntax in deployment parameters, you should NOT wrap the template expression in quotes. Here's the correct way:
Copy code
python
transfer_files_flow.serve(
    name=CONSTANTS.DEPLOYMENT_NAMES.TRANSFER_FILES_SOLSOC_TO_DATASTORE,
    parameters=dict(
        source_block={{ prefect.blocks.mycustomblock.some-name }},  # Remove the quotes
    ),
)
The reason for this is: 1. When you wrap the template expression in quotes, it's treated as a literal string rather than a template expression 2. The deployment service then tries to process
"{{ prefect.blocks.mycustomblock.some-name }}"
as a literal string value, which isn't valid JSON (hence the 422 Unprocessable Entity error) 3. Without the quotes, the template expression is properly parsed and will be resolved at runtime to the actual block reference Also, make sure that: 1. The block type slug ("mycustomblock") matches exactly what's registered in your Prefect server 2. The block name ("some-name") exists and is accessible 3. Your flow has the necessary permissions to access the block If you're still getting errors after removing the quotes, please let me know and we can investigate further. It would be helpful to see the full error message in that case.