Skip to content

Fix 500 on POST /applications when redirect is null - #3

Closed
bobdivx wants to merge 1 commit into
mainfrom
fix/create-application-null-redirect
Closed

bobdivx wants to merge 1 commit into
mainfrom
fix/create-application-null-redirect

Conversation

@bobdivx

@bobdivx bobdivx commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Creating an application from GitHub 500s because Application::create() does not set redirect. Eloquent keeps null in memory even if Postgres defaults to both.
  • generateLabelsApplication() then passes that null to fqdnLabelsForTraefik(), which requires a string (TypeError).
  • Set redirect => both at creation, coalesce nulls in Traefik/Caddy label generation, and cover custom domains in the create API test.

Test plan

  • POST /api/devforge/v1/applications with a custom domain (e.g. popcornn.app) returns 201
  • No TypeError about fqdnLabelsForTraefik Argument fix: detect updates when GitHub repo is private #11 redirect_direction in laravel.log
  • Delete the three leftover popcorn-web rows created by the failed attempts before retrying

Made with Cursor

New GitHub apps left redirect null in memory, so generating labels TypeErrored even though Postgres stores the default both.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant