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

Returns 500 #30

Closed
JustRostin opened this issue Apr 21, 2020 · 4 comments
Closed

Returns 500 #30

JustRostin opened this issue Apr 21, 2020 · 4 comments

Comments

@JustRostin
Copy link

When using de mattermost driver it always returns a status code of 500.

The following code is used:

use Gnello\Mattermost\Driver;
 $container = new \Pimple\Container([
            "driver"=>[
                "url"=>"https://mattermost-url.com",
                "login_id"=>"username",
                "password"=>"password",
            ]
        ]);
        $driver = new Driver($container);
        $driver->authenticate();
        $resp = $driver->getPostModel()->createPost([
            'channel_id' => 'channel_id',
            'messages' => 'message'
        ]);
        $status = $resp->getStatusCode();
       return $status;

Where status is always 500.

When I use the same credentials using postman it returns 200.

@gnello
Copy link
Owner

gnello commented Apr 21, 2020

Hi,
I can't reproduce this error, could you provide more info about the 500 error?

BTW the parameter to be sent is message (not messages) I just corrected this error in the readme.

@JustRostin
Copy link
Author

When I get the ReasonPhrase it says internal server error, I checked with the system admin that since we already have 2 java accounts like this it is highly likeable that it is caused by the server.

@JustRostin
Copy link
Author

Hey looked into it with a SR. Dev and found the issue the https:// in the uurl shoudn't be there.

Thanks for looking into it.

@gnello
Copy link
Owner

gnello commented Apr 23, 2020

I'm glad to hear that :)

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

No branches or pull requests

2 participants