Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Status Labels Error Message #15566

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Godmartinz
Copy link
Collaborator

Description

Error message handler for status labels had an extra parameter in it. It was returning Server Error: [object Object]. This fixes that.

Before:
image

After:
image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

Copy link

what-the-diff bot commented Sep 25, 2024

PR Summary

  • Improved Code Consistency
    This PR corrects the formatting of an error message code section. This change maintains code consistency, making it easier for developers to read and understand what's happening. This is beneficial because clean, consistent code can result in fewer bugs and faster development times.

Copy link
Owner

@snipe snipe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions/comments

@@ -95,7 +95,8 @@ public function store(Request $request) : JsonResponse
$request->except('deployable', 'pending', 'archived');

if (! $request->filled('type')) {
return response()->json(Helper::formatStandardApiResponse('error', null, ['type' => ['Status label type is required.']]), 500);

return response()->json(Helper::formatStandardApiResponse('error', null, ['type' => ['Status label type is required.']]));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't normal validation kicking in here? Also this really shouldn't 500 at the API, since it's a validation error and we don't 500 on those.

@snipe
Copy link
Owner

snipe commented Oct 16, 2024

Ping @Godmartinz

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