jhoerr / box-csharp-sdk-v2

A C# client for the Box API (v2).
http://developers.box.com/docs/
11 stars 15 forks source link

ChangePrimaryLogin Throws Bad Request Exception Information not available #15

Closed mascon closed 11 years ago

mascon commented 11 years ago

When using this code The user does not get updated and the ex.Message throws an exception.

                    Try

                        ManagedUser = BoxClient.ChangePrimaryLogin(ManagedUser.Id, "newemail@domain.com")

                    Catch ex As BoxException

                        Debug.WriteLine("Update results:" & ex.HttpStatusCode)
                        Debug.WriteLine("Update results:" & ex.Message)

                    End Try

This appears to be the only way to change a users e-mail address in API V2.

POSTMan also returns a 400 error but I should be able to get to the message without it causing an exception I believe?

jhoerr commented 11 years ago

BoxException should now properly provide Message and Code information as of 4ce1c9c37b92db86ba5e8cb5209fef000a10e69a.

jhoerr commented 11 years ago

Debugging ideas, off the top of my head:

As I read the documentation all of those must be true in order for that request to work.

mascon commented 11 years ago

Yep works far better now thanks.

Sent from my BlackBerry® wireless device

-----Original Message----- From: John Hoerr notifications@github.com Date: Mon, 07 Jan 2013 16:57:47 To: jhoerr/box-csharp-sdk-v2box-csharp-sdk-v2@noreply.github.com Reply-To: jhoerr/box-csharp-sdk-v2 reply@reply.github.com Cc: masconimom@andimgone.com Subject: Re: [box-csharp-sdk-v2] ChangePrimaryLogin Throws Bad Request Exception Information not available (#15)

BoxException should now properly provide Message and Code information as of 4ce1c9c37b92db86ba5e8cb5209fef000a10e69a.


Reply to this email directly or view it on GitHub: https://github.com/jhoerr/box-csharp-sdk-v2/issues/15#issuecomment-11979823