Skip to content

Add proper Bloxlink API key validation#6

Merged
BenHall-1 merged 1 commit into
mainfrom
bloxlink-validation
Jun 21, 2026
Merged

Add proper Bloxlink API key validation#6
BenHall-1 merged 1 commit into
mainfrom
bloxlink-validation

Conversation

@biast12

@biast12 biast12 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

This PR reworks the Bloxlink /validate endpoint to proper validate if the API key is correct in Bloxlink too

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Improvement

Testing

In your worker, test the /validate endpoint with invalid keys

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Rework validate and lookup handlers to centralize API key/body parsing and improve upstream error handling. handleValidate now accepts a request context, queries the Bloxlink guild discord-to-roblox endpoint, and maps specific upstream errors (including treating "User not found" as a valid empty result). handleLookup signature was updated similarly and now relies on pre-parsed apiKey/body; request.json and header validation were moved into the main handler to avoid double-parsing and to return clearer 400/500 statuses when appropriate.
@biast12 biast12 requested a review from a team as a code owner May 13, 2026 10:26
@BenHall-1 BenHall-1 merged commit 75341f4 into main Jun 21, 2026
2 checks passed
@BenHall-1 BenHall-1 deleted the bloxlink-validation branch June 21, 2026 20:19
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.

2 participants